pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: scott.marlowe <scott.marlowe@ihs.com>
To: Yudie <yudie@axiontech.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: how to copy table to another database?
Date: Fri, 18 Jul 2003 14:58:48 -0600 (MDT)
Message-ID: <Pine.LNX.4.33.0307181457570.2787-100000@css120.ihs.com> (raw)
In-Reply-To: <003101c34d6d$cb199010$8401a8c0@yudie>

On Fri, 18 Jul 2003, Yudie wrote:

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

If you want to copy a table from one db to another, you can use this:

pg_dump dbname -t tablename |psql dbname -e

If you want cross database queries, look in the /contrib/dblink dir in the 
tarball of postgresql




view thread (3+ messages)  latest in thread

Message-ID: <Pine.LNX.4.33.0307181457570.2787-100000@css120.ihs.com>
Permalink:  ../Pine.LNX.4.33.0307181457570.2787-100000@css120.ihs.com/
Also on:    postgresql.org/message-id/Pine.LNX.4.33.0307181457570.2787-100000@css120.ihs.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: scott.marlowe@ihs.com, yudie@axiontech.com
  Subject: Re: how to copy table to another database?
  In-Reply-To: <Pine.LNX.4.33.0307181457570.2787-100000@css120.ihs.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox