Re: COPY between 7.4.x and 8.3.x

From: "Francisco Reyes" <lists(at)stringsutils(dot)com>
To: Jack Orenstein <jack(dot)orenstein(at)hds(dot)com>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: COPY between 7.4.x and 8.3.x
Date: 2008-07-22 22:13:16
Message-ID: 069ec26c673cadab5f65dc065af24a24@stringsutils.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 6:01 pm 07/21/08 Jack Orenstein <jack(dot)orenstein(at)hds(dot)com> wrote:
> to this:
> psql -h $SOURCE_HOST ... -c "copy binary $SOURCE_SCHEMA.$SOURCE_T
> ABLE to
> stdout" |\
> psql ... -c "copy binary $TARGET_SCHEMA.$TARGET_TABLE from stdin"

http://www.postgresql.org/docs/8.3/interactive/sql-copy.html

>>The BINARY key word causes all data to be stored/read as binary format
>>rather than as text. It is somewhat faster than the normal text mode, but a
>>binary-format file is less portable across machine architectures and
>>PostgreSQL versions.<<

I would suggest to not go that route.
However, you could just test it and see if it works.
If you are doing multiple tables I still think you should consider pg_dump
-Fc. You can restore just the data without the DDL.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Oleg Bartunov 2008-07-22 22:27:03 Re: Full text index without accents
Previous Message Oleg Bartunov 2008-07-22 22:07:47 Re: Optimizing a like-cause