Home:ALL Converter>How to query PostgreSQL for a list of schemata with comments?

How to query PostgreSQL for a list of schemata with comments?

Ask Time:2017-05-12T00:25:10         Author:Tim Needham

Json Formatter

I'm trying to get a list of schemata in PostgreSQL (9.6) along with any comments which might have been added...

This works great to get a list of schema names:

select schema_name
from information_schema.schemata

...but how do you get the associated comment (if there is one) as well?

  • I've found loads of stuff to get database/table/column comments... schema comments seem to be evading me?

Any help gratefully received!

Author:Tim Needham,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/43920958/how-to-query-postgresql-for-a-list-of-schemata-with-comments
yy