\pset format csv
\o col_names.csv
SELECT
attrelid::regclass AS table_name,
attname AS column_name
FROM
pg_attribute pa
JOIN pg_class pc ON pa.attrelid = oid
AND relkind = 'r'
AND relnamespace NOT IN ('pg_catalog'::regnamespace, 'information_schema'::regnamespace);
\o
\! head col_names.csv
table_name,column_name
pricing_production,pricegroup
pricing_production,price_id
pricing_production,q_brk_1
pricing_production,q_brk_2
pricing_production,q_brk_3
pricing_production,q_brk_4
pricing_production,q_brk_5
pricing_production,q_brk_6
pricing_production,b_seas_1
1条答案
按热度按时间u4dcyp6a1#
pgAdmin
可以访问psql,因此: