Re: how do I get table DDL from psql (not from pg_dump)

From: Lew <lew(at)lwsc(dot)ehost-services(dot)com>
To: pgsql-admin(at)postgresql(dot)org(dot)pgsql-sql(at)postgresql(dot)org
Subject: Re: how do I get table DDL from psql (not from pg_dump)
Date: 2008-02-27 16:57:49
Message-ID: nMidnQjJ-cQQC1janZ2dnUVZ_vfinZ2d@comcast.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-sql

A. Kretschmer wrote:
> am Wed, dem 27.02.2008, um 5:22:33 -0600 mailte Sofer, Yuval folgendes:
>> Hi
>>
>>
>>
>> I need to extract table DDL (create script) from database connection (using
>> sql, by retrieving system table info or by activating some pg function)
>>
>>
>>
>> Is this possible in postgres?
>
> Why not using pg_dump?
>
> You can specify with -n and -t an arbitrary table and with -s you get
> only the DDL, not the data.

The "-s" option has come up as an answer to both multi-posted instances of
this question.

--
Lew

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message libra dba 2008-02-27 20:54:07 Re: Failover of the Primary database and starting the standby database in Postgresql in PITR configuraiton?
Previous Message Tom Lane 2008-02-27 16:54:00 Re: How to reindex when unable to open relation?

Browse pgsql-sql by date

  From Date Subject
Next Message Steve Crawford 2008-02-27 18:31:32 Re: SQL standards in Mysql
Previous Message Frank Bax 2008-02-27 15:23:28 Re: how do I get table DDL from psql (not from pg_dump)