Search Postgresql Archives

Re: Needs Suggestion

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Apr 19, 2011 at 5:06 PM, SUBHAM ROY <subham.iem@xxxxxxxxx> wrote:
> Suppose Postgres is installed in two computers C1 & C2.
> C1 have some database tables. How can I copy these database tables from C1
> to C2.
> I mean to say that can I copy tables from postgres installed in one m/c to
> another m/c.
> Is there any command in postgres to do so or any other short cut technique.

Assuming you don't have to worry about foreign keys etc, you can dump
a table from one db and feed it to a psql session open to another:

pg_dump -h host1 dbname -t tablename | psql -h host2 dbname

and so on.

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux