Re: how to copy table to another database? - Mailing list pgsql-sql

From Dmitry Tkach
Subject Re: how to copy table to another database?
Date
Msg-id 3F18616E.60407@openratings.com
Whole thread Raw
In response to how to copy table to another database?  ("Yudie" <yudie@axiontech.com>)
List pgsql-sql
Yudie wrote:

> Hi,
> Anyone know how the procedure or commands to copy table to another 
> database.
> or querying from another database if possible?
>
> thank you
>
> yudie

Something like this, perhaps?

psql -d first_database -c '\copy mytable to stdout'  | psql -d 
second_database -c '\copy mytable from stdin'

I hope, it helps...

Dima



pgsql-sql by date:

Previous
From: "Yudie"
Date:
Subject: how to copy table to another database?
Next
From: "scott.marlowe"
Date:
Subject: Re: how to copy table to another database?