Re: Copying few tables from one database to another - Mailing list pgsql-general

From Vibhor Kumar
Subject Re: Copying few tables from one database to another
Date
Msg-id A2F9A8CA-7B1D-4745-9B0E-56ED0FBC87FA@enterprisedb.com
Whole thread Raw
In response to Copying few tables from one database to another  (Alexander Farber <alexander.farber@gmail.com>)
List 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 by date:

Previous
From: Alexander Farber
Date:
Subject: Copying few tables from one database to another
Next
From: Andre Lopes
Date:
Subject: Re: PHP array to PlPgSQL arrat. How to?