How to extract table DDL from PGSQL database?

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

How to extract table DDL from PGSQL database?

От:
David Wagoner <dwagoner@arsenaldigital.com>
Дата:

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 <tgl@sss.pgh.pa.us>
Дата:
David Wagoner  writes:
> How do I extract table or view DDL from a postgresql database?

"pg_dump -s" is the usual way.

			regards, tom lane
FAQ