Re: Create Table Scripts

From: "Brett W(dot) McCoy" <bmccoy(at)chapelperilous(dot)net>
To: <chuckk(at)ext(dot)usu(dot)edu>
Cc: <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Create Table Scripts
Date: 2001-01-06 21:49:53
Message-ID: Pine.LNX.4.30.0101061648580.8905-100000@chapelperilous.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On Sat, 6 Jan 2001 chuckk(at)ext(dot)usu(dot)edu wrote:

> You know what I think would be pretty cool? If someone out there would
> tell me that Postgresql can build "Create Table" scripts by looking at
> an existing table. Then I wouldn't have to re-create my Create Table
> scirpt files I just incinerated.... Yeah... That would be cool if
> someone told me it could do that..

pg_dump -s <database>

will dump out scripts to build your database. If you eliminate the -s, it
will also dump the data as insert statements.

-- Brett
http://www.chapelperilous.net/~bmccoy/
---------------------------------------------------------------------------
The light at the end of the tunnel may be an oncoming dragon.

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Brett W. McCoy 2001-01-06 21:51:51 Re: Create Table Scripts
Previous Message Eric Nielsen 2001-01-06 21:35:44 Re: Create Table Scripts