pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: reina_ga@hotmail.com
Cc: pgsql-sql@postgresql.org
Subject: Re: best method to copy data across databases
Date: Fri, 02 Jul 2004 10:12:07 -0400
Message-ID: <14059.1088777527@sss.pgh.pa.us> (raw)
In-Reply-To: <272e4be7.0407020310.18785557@posting.google.com>
References: <46a31c4d.0407011942.37839bb0@posting.google.com>
	<272e4be7.0407020310.18785557@posting.google.com>

reina_ga@hotmail.com (Tony Reina) writes:
> If the 2 tables have different arrangements, then I'm not sure if
> there is a quick way. The safest way is probably to do a pg_dump
> --attribute-inserts.

In recent versions (definitely 7.4, don't remember about 7.3),
pg_dump will include a column list in its COPY commands, so a
plain pg_dump should work.  The way with COPY will be a good bit
faster than a pile of INSERT commands.

			regards, tom lane



view thread (4+ messages)  latest in thread

Message-ID: <14059.1088777527@sss.pgh.pa.us>
Permalink:  ../14059.1088777527@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/14059.1088777527@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, reina_ga@hotmail.com
  Subject: Re: best method to copy data across databases
  In-Reply-To: <14059.1088777527@sss.pgh.pa.us>

* 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