Re: Get the table creation DDL

Поиск
Список
Период
Сортировка
От 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
On 7/10/22 13:57, Michael Nolan wrote:
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 по дате отправления:

Предыдущее
От: Michael Nolan
Дата:
Сообщение: Re: Get the table creation DDL
Следующее
От: Igor Korot
Дата:
Сообщение: Re: Get the table creation DDL