pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrew Sullivan <ajs@crankycanuck.ca>
To: pgsql-admin@postgresql.org
Subject: Re: how do I get table DDL from psql (not from pg_dump)
Date: Wed, 27 Feb 2008 10:50:08 -0500
Message-ID: <20080227155008.GA7920@crankycanuck.ca> (raw)
In-Reply-To: <BE67D1149BBD5746984545ED91F702E0BD4ADE@hou-ex-02.adprod.bmc.com>
References: <BE67D1149BBD5746984545ED91F702E0BD4ADE@hou-ex-02.adprod.bmc.com>

On Wed, Feb 27, 2008 at 05:21:08AM -0600, Sofer, Yuval wrote:
> I need to extract table DDL (create script) from database connection
> (using sql, by retrieving system table info or by activating some pg
> function)

pg_dump -s does this.  See the manual for more details on the switches.

A




view thread (6+ messages)  latest in thread

Message-ID: <20080227155008.GA7920@crankycanuck.ca>
Permalink:  ../20080227155008.GA7920@crankycanuck.ca/
Also on:    postgresql.org/message-id/20080227155008.GA7920@crankycanuck.ca

 · 

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-admin@postgresql.org
  Cc: ajs@crankycanuck.ca
  Subject: Re: how do I get table DDL from psql (not from pg_dump)
  In-Reply-To: <20080227155008.GA7920@crankycanuck.ca>

* 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