Last active
August 29, 2015 14:21
-
-
Save rcackermanCC/2e7ad013d32e835ff52a to your computer and use it in GitHub Desktop.
Roll your own data dictionary
This file contains hidden or 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 | |
| table_name, | |
| column_name, | |
| data_type, | |
| col_description(concat('public.',table_name)::regclass, ordinal_position) | |
| FROM information_schema.columns where table_name like '<stuff>'; |
This file contains hidden or 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 distinct | |
| table_name, | |
| obj_description(concat('public.',table_name)::regclass, 'pg_class') | |
| FROM information_schema.columns where table_name like '<stuff>'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment