Функция plpgsql с курсором по таблице geo_objects.
CREATE OR REPLACE FUNCTION geo_objects_cursor() RETURNS void AS $body$ DECLARE record geo_objects%ROWTYPE; BEGIN FOR record IN (SELECT * FROM geo_objects) LOOP RAISE NOTICE '%', record; END LOOP; END; $body$ LANGUAGE plpgsql;