ANTON KADACH

Generation

text to sql syntaxTue, 17 Jan 2023

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

CREATE OR REPLACE FUNCTION public.test_table_iterator() RETURNS void AS $BODY$ DECLARE r record; BEGIN FOR r IN SELECT * FROM customers LOOP RAISE NOTICE 'name: % name: %', r.name, r.age; END LOOP; END; $BODY$ LANGUAGE plpgsql VOLATILE

Questions about programming?Chat with your personal AI assistant