Re: PostgreSQL equivalents to dbms_metadata.get_ddl & dbms_metadata.get_dependent_ddl

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: PostgreSQL equivalents to dbms_metadata.get_ddl & dbms_metadata.get_dependent_ddl
Дата
Msg-id 803987.1679264801@sss.pgh.pa.us
обсуждение исходный текст
Ответ на PostgreSQL equivalents to dbms_metadata.get_ddl & dbms_metadata.get_dependent_ddl  (richard coleman <rcoleman.ascentgl@gmail.com>)
Список pgsql-admin
richard coleman <rcoleman.ascentgl@gmail.com> writes:
> I am trying to find a simple way to get access the DDL information for
> PostgreSQL tables, constraints, and indices via SQL.

There are bits of that, but it's not terribly complete or consistent
because nobody's made a concerted effort to build stuff that wasn't
driven by "what does pg_dump need".  (And what pg_dump needs, for
the most part, is not simply "give me all the DDL for this object
in a black box".)

I'd suggest taking a look at the pg_get_* functions, which are
mostly documented at

https://www.postgresql.org/docs/current/functions-info.html

There are some other things on that page that might help, too.

            regards, tom lane



В списке pgsql-admin по дате отправления:

Предыдущее
От: richard coleman
Дата:
Сообщение: PostgreSQL equivalents to dbms_metadata.get_ddl & dbms_metadata.get_dependent_ddl
Следующее
От: MichaelDBA
Дата:
Сообщение: Re: PostgreSQL equivalents to dbms_metadata.get_ddl & dbms_metadata.get_dependent_ddl