From: Oliver Jowett <oliver@opencloud.com>
To: mbch67@yahoo.com
Cc: pgsql-jdbc@postgresql.org
Subject: Re: 8.0.0beta4: "copy" and "client_encoding"
Date: Thu, 04 Nov 2004 10:17:22 +0000
Message-ID: <418A01B2.70104@opencloud.com> (raw)
In-Reply-To: <fe065ce.0411032308.5b7a24b3@posting.google.com>
References: <fe065ce.0411030803.4616e8c4@posting.google.com>
<41893BC8.6000201@opencloud.com>
<fe065ce.0411032308.5b7a24b3@posting.google.com>
mbch67@yahoo.com wrote:
> Thanks Kris and Oliver for your explanations.
>
> Why I want to set the client_encoding to latin1? That's a fair
> question. Unfortunately I removed the statement following the COPY
> command to keep the posting short:
>
> SET CLIENT_ENCODING TO 'LATIN1';
> COPY temp_test FROM '/home/postgres/temp_test.dat';
>
> I want to load a latin1-encoded file using the COPY command.
Hmm. I am suprised that COPY does not let you specify the encoding of
the input file. Using client_encoding for this seems wrong: there are
some cases it can't handle, e.g. trying to load a LATIN1-encoded file
into a table that has a name that can't be represented in LATIN1.
I suppose that in the absence of backend support for this, we could add
some URL parameter that allows client_encoding to be changed, with
suitably dangerous warnings around using it. Then you can temporarily
flip client_encoding to LATIN1 for the duration of the COPY, and revert
it to UNICODE afterwards.
-O
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: oliver@opencloud.com, mbch67@yahoo.com
Subject: Re: 8.0.0beta4: "copy" and "client_encoding"
In-Reply-To: <418A01B2.70104@opencloud.com>
References: <fe065ce.0411030803.4616e8c4@posting.google.com> <41893BC8.6000201@opencloud.com> <fe065ce.0411032308.5b7a24b3@posting.google.com> <418A01B2.70104@opencloud.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