SELECT
'alter table "public"."'||
t.tablename
||'"'
||' rename to "'
|| "lower"(t.tablename)
||'";'
FROM
pg_tables T
WHERE
T .schemaname = 'public';

///alter table 表名 rename 字段名 to 新字段名

///所有表名 pg_tables

05-11 17:53