Created
July 15, 2020 07:13
-
-
Save jonmathews/1f0572178b8c538f055734fbb1b9dfbb to your computer and use it in GitHub Desktop.
Get column metadata from Postgres
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT c.relname AS table, d.description | |
FROM pg_catalog.pg_description d | |
LEFT JOIN pg_class c | |
ON d.objoid = c.oid | |
WHERE d.objsubid = 0 | |
AND c.relname is not null |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment