Created
April 3, 2022 20:41
-
-
Save YPermitin/f47a2e9e29140c414919ccc51b54b36d to your computer and use it in GitHub Desktop.
Revisions
-
YPermitin created this gist
Apr 3, 2022 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,23 @@ do $$ declare text_result text default ''; rec_someval record; dt_cursor cursor for select tablename AS table_name from pg_catalog.pg_tables order by tablename; begin open dt_cursor; loop fetch dt_cursor into rec_someval; exit when not found; text_result := text_result || chr(10) || rec_someval.table_name::text; end loop; close dt_cursor; RAISE NOTICE '%', text_result; end $$ language 'plpgsql';