BEGIN
UPDATE placex SET indexed_status = 2 WHERE place_id = placeid;
SELECT geometry, rank_search FROM placex WHERE place_id = placeid INTO placegeom, rank;
BEGIN
UPDATE placex SET indexed_status = 2 WHERE place_id = placeid;
SELECT geometry, rank_search FROM placex WHERE place_id = placeid INTO placegeom, rank;