I have migrated a MySQL database to PostgreSQL & replaced the query
SHOW FULL COLUMNS FROM schema_name.table_name;
with a Postgres equivalent,
SELECT * FROM information_schema.columns WHERE table_schema = 'schema_name' and table_name = 'table_name';
which returns the columns along with their properties however the 'Comment' property that was returned in the MySQL query is not returned in the PostgreSQL query.
Is there a way to query for the comments associated with each column_name?
Dan :
How about this:\n\nselect col_description((table_schema||'.'||table_name)::regclass::oid, ordinal_position) as column_comment\n, * from information_schema.columns \nWHERE table_schema = 'schema_name' \nand table_name = 'table_name';\n",
2017-04-13T22:19:26