| От | Mladen Gogala |
|---|---|
| Тема | Re: Get the table creation DDL |
| Дата | |
| Msg-id | f4a21927-c777-0239-6417-8af47bc76141@gmail.com обсуждение |
| Ответ на | Re: Get the table creation DDL (Michael Nolan <htfoot@gmail.com>) |
| Список | pgsql-general |
I do not know those other tools, but there should be documentation for them, as there is in the man page for how to process just one table using pg_dump. You can pipe the output of pg_dump directly to psql, but I find that's seldom useful.--Mike Nolan
There is an extension which does precisely what you need:
https://github.com/MichaelDBA/pg_get_tabledef
In my opinion, that is a little inconsistency on the part of the maintainers part because there are functions pg_get_functiondef, pg_get_indexdef and pg_get_viewdef but nothing for tables.
https://www.postgresql.org/docs/14/functions-info.html
-- Mladen Gogala Database Consultant Tel: (347) 321-1217 https://dbwhisperer.wordpress.com
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера