Re: Needs Suggestion - Mailing list pgsql-general

From Scott Marlowe
Subject Re: Needs Suggestion
Date
Msg-id BANLkTin-JCn0-LSQL64OGEA7u24t_qS6gg@mail.gmail.com
Whole thread Raw
In response to Needs Suggestion  (SUBHAM ROY <subham.iem@gmail.com>)
List pgsql-general
On Tue, Apr 19, 2011 at 5:06 PM, SUBHAM ROY <subham.iem@gmail.com> 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.

pgsql-general by date:

Previous
From: SUBHAM ROY
Date:
Subject: Needs Suggestion
Next
From: Geraldo Lopes de Souza
Date:
Subject: Re: Are Update rights on the target table of a do instead update rule necessary ?