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

From: Andrew Sullivan <ajs(at)crankycanuck(dot)ca>
To: pgsql-admin(at)postgresql(dot)org
Subject: Re: how do I get table DDL from psql (not from pg_dump)
Date: 2008-02-27 15:50:08
Message-ID: 20080227155008.GA7920@crankycanuck.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

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

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2008-02-27 16:54:00 Re: How to reindex when unable to open relation?
Previous Message Frank Bax 2008-02-27 15:23:28 Re: how do I get table DDL from psql (not from pg_dump)