Re: Defining the same relation in another database - Mailing list pgsql-novice

From Shoaib Mir
Subject Re: Defining the same relation in another database
Date
Msg-id bf54be870604190117m4e7257cbtdd88acaa5bd0a659@mail.gmail.com
Whole thread Raw
In response to Defining the same relation in another database  (Michael Talbot-Wilson <mtw@view.net.au>)
List pgsql-novice
Take the database dump using

pg_dump dbname > outfile

Now you can easily take out the DDL for relations and use them in another database.

/Shoaib

On 4/19/06, Michael Talbot-Wilson <mtw@view.net.au> wrote:
How do you do this?  I guess it may require heroic methods such as the
editing of dumps.  Or it is easy?

I'd like to do this because the \d is complicated.  I've prototyped
this thing in a temp database and now I'd like to do it for real.  I'd
rather not copy it down on paper and do it all again.

It is okay to move the relation and its data, but I really just want
to recreate it in another database.


---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

pgsql-novice by date:

Previous
From: Tom Lane
Date:
Subject: Re: Schema 'public'
Next
From: "Guido Barosio"
Date:
Subject: Re: Defining the same relation in another database