Re: Defining the same relation in another database

Поиск
Список
Период
Сортировка
От Shoaib Mir
Тема Re: Defining the same relation in another database
Дата
Msg-id bf54be870604190117m4e7257cbtdd88acaa5bd0a659@mail.gmail.com
обсуждение исходный текст
Ответ на Defining the same relation in another database  (Michael Talbot-Wilson <mtw@view.net.au>)
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Schema 'public'
Следующее
От: "Guido Barosio"
Дата:
Сообщение: Re: Defining the same relation in another database