Re: best method to copy data across databases

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: reina_ga(at)hotmail(dot)com (Tony Reina)
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: best method to copy data across databases
Date: 2004-07-02 14:12:07
Message-ID: 14059.1088777527@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

reina_ga(at)hotmail(dot)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

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message George Siganos 2004-07-02 17:39:14 Re: Question about a CIDR based query
Previous Message Tony Reina 2004-07-02 11:10:15 Re: best method to copy data across databases