Home:ALL Converter>Getting list of table comments in PostgreSQL

Getting list of table comments in PostgreSQL

Ask Time:2011-04-14T21:35:57         Author:Bionicman303

Json Formatter

Postgresql allows adding comments to objects such as tables. For example I've added a comment to table "mytable" by using this SQL command:

COMMENT ON TABLE mytable IS 'This is my table.';

My question is: If I want to use a SQL-command to get all tables along with their respective comment - how would I do this? What would be the appropriate query for this?

Thanks in advance! Cheers!

Author:Bionicman303,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/5664094/getting-list-of-table-comments-in-postgresql
yy