Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-admin by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group