Re: Copying data from one table of one database to other table f other database

Поиск
Список
Период
Сортировка
От Jasen Betts
Тема Re: Copying data from one table of one database to other table f other database
Дата
Msg-id gt6uu8$lr4$1@reversiblemaps.ath.cx
обсуждение исходный текст
Ответ на Copying data from one table of one database to other table f other database  ("Preetam Palwe" <preetamp@aftek.com>)
Список pgsql-novice
On 2009-04-27, Preetam Palwe <preetamp@aftek.com> wrote:
> This is a multi-part message in MIME format.

> Hello all
>
>                 I want to copy the data from one table to other table.
> These tables reside in two different databases.
>
> I am thinking of using following query=20
>
>
> insert into table2 (select * from table1)
>
>
> but the problem is how can I specify the database name?

you can't



you can do this however:

 psql -c " copy (select * from table1) to stdout " database1 | psql -c " copy table2 from stdin " database2


В списке pgsql-novice по дате отправления:

Предыдущее
От: David Gardner
Дата:
Сообщение: Re: Question on collapsing a sparse matrix
Следующее
От: "Preetam Palwe"
Дата:
Сообщение: Re: Re: Copying data from one table of one database to other table f other database