pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Lew <lew@lwsc.ehost-services.com>
To: pgsql-admin@postgresql.org.pgsql-sql
Subject: Re: how do I get table DDL from psql (not from pg_dump)
Date: Wed, 27 Feb 2008 11:57:49 -0500
Message-ID: <nMidnQjJ-cQQC1janZ2dnUVZ_vfinZ2d@comcast.com> (raw)
In-Reply-To: <20080227121911.GE21865@a-kretschmer.de>
References: <BE67D1149BBD5746984545ED91F702E0BD4AE3@hou-ex-02.adprod.bmc.com>
	<20080227121911.GE21865@a-kretschmer.de>

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



view thread (4+ messages)

Message-ID: <nMidnQjJ-cQQC1janZ2dnUVZ_vfinZ2d@comcast.com>
Permalink:  ../nMidnQjJ-cQQC1janZ2dnUVZ_vfinZ2d@comcast.com/
Also on:    postgresql.org/message-id/nMidnQjJ-cQQC1janZ2dnUVZ_vfinZ2d@comcast.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: lew@lwsc.ehost-services.com, pgsql-admin@postgresql.org.pgsql-sql
  Subject: Re: how do I get table DDL from psql (not from pg_dump)
  In-Reply-To: <nMidnQjJ-cQQC1janZ2dnUVZ_vfinZ2d@comcast.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox