Re: how to copy table to another database?

From: Dmitry Tkach <dmitry(at)openratings(dot)com>
To: Yudie <yudie(at)axiontech(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: how to copy table to another database?
Date: 2003-07-18 21:06:54
Message-ID: 3F18616E.60407@openratings.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Mike Rylander 2003-07-18 21:07:48 casting to arrays
Previous Message scott.marlowe 2003-07-18 20:58:48 Re: how to copy table to another database?