Обсуждение: How to extract table DDL from PGSQL database?

Поиск
Список
Период
Сортировка

How to extract table DDL from PGSQL database?

От
David Wagoner
Дата:

How do I extract table or view DDL from a postgresql database?  I thought the PGAdmin tool would do this, but I haven't found the functionality there yet.  Looked at the system catalog tables, but didn't find everything I needed (version 7.1 postgresql).  Anyone have a script or know of a tool?

Thanks.

Best regards,

David B. Wagoner
Database Administrator

Re: How to extract table DDL from PGSQL database?

От
Tom Lane
Дата:
David Wagoner <dwagoner@arsenaldigital.com> writes:
> How do I extract table or view DDL from a postgresql database?

"pg_dump -s" is the usual way.

            regards, tom lane