Re: Create Table Scripts - Mailing list pgsql-novice

From Brett W. McCoy
Subject Re: Create Table Scripts
Date
Msg-id Pine.LNX.4.30.0101061650410.8905-100000@chapelperilous.net
Whole thread Raw
In response to Create Table Scripts  (chuckk@ext.usu.edu)
List pgsql-novice
On Sat, 6 Jan 2001, Brett W. McCoy wrote:

> On Sat, 6 Jan 2001 chuckk@ext.usu.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.

I'm sorry, that's not quite correct -- the -d option will dump your data
as insert statements, otherwise your data gets dumped directly and can be
copied back into the database as a COPY form stdin.

-- Brett
                                     http://www.chapelperilous.net/~bmccoy/
---------------------------------------------------------------------------
Conscience is a mother-in-law whose visit never ends.
        -- H. L. Mencken


pgsql-novice by date:

Previous
From: chuckk@ext.usu.edu
Date:
Subject: Create Table Scripts
Next
From: "Eric Nielsen"
Date:
Subject: Re: Create Table Scripts