Hello, Is there a simpler way of getting a PostgreSQL database structure than reading system catalogs pg_tables, pg_attributes, pg_class, pg_type, pg_index etc.? I need to get information about tables, attributes, data types, primary and foreign keys. Thanks. postgres_autodoc & dia are good tools. -- Aleksey mailto:a-l-x@mail.od.ua
On Fri, 22 Nov 2002, Alex Zavalin wrote: > Hello, > > Is there a simpler way of getting a PostgreSQL database structure than > reading system catalogs pg_tables, pg_attributes, pg_class, pg_type, > pg_index etc.? I need to get information about tables, attributes, > data types, primary and foreign keys. The simple answer, uh, sorta, using psql's \ commands. The long answer is to take the code that psql's \ commands use and make a view out of them. I.e. do 'psel -E database' then '\d tablename' Then take the sql statements and make views out of them.
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера