Re: Copying few tables from one database to another

Поиск
Список
Период
Сортировка
От Vibhor Kumar
Тема Re: Copying few tables from one database to another
Дата
Msg-id A2F9A8CA-7B1D-4745-9B0E-56ED0FBC87FA@enterprisedb.com
обсуждение исходный текст
Ответ на Copying few tables from one database to another  (Alexander Farber <alexander.farber@gmail.com>)
Список pgsql-general
On Mar 6, 2011, at 7:13 PM, Alexander Farber wrote:

> what is please the command to copy tables from 1 database
> from another and is it possible at all without using pg_dump?



You can create Structure of table in New database and then you can use COPY Command to copy data as given below:
psql -c 'COPY tablename to STDOUT;' dbname|psql -c 'COPY tablename from STDIN;' dbname


Thanks & Regards,
Vibhor Kumar
EnterpriseDB Corporation
The Enterprise PostgreSQL Company
vibhor.kumar@enterprisedb.com
Blog:http://vibhork.blogspot.com


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

Предыдущее
От: Alexander Farber
Дата:
Сообщение: Copying few tables from one database to another
Следующее
От: Andre Lopes
Дата:
Сообщение: Re: PHP array to PlPgSQL arrat. How to?