ANTON KADACH

Generation

text to sql syntaxTue, 17 Jan 2023

Функция plpgsql с курсором по таблице geo_objects.

CREATE OR REPLACE FUNCTION test_cursor() RETURNS void AS $$ DECLARE rec record; BEGIN FOR rec IN SELECT * FROM geo_objects LOOP RAISE NOTICE 'id = %, name = %', rec.id, rec.name; END LOOP; END; $$ LANGUAGE plpgsql;

Questions about programming?Chat with your personal AI assistant