Re: 8.0.0beta4: "copy" and "client_encoding"
| От | Ulrich Meis |
|---|---|
| Тема | Re: 8.0.0beta4: "copy" and "client_encoding" |
| Дата | |
| Msg-id | 200411051539.37753.kenobi@halifax.rwth-aachen.de обсуждение исходный текст |
| Ответ на | Re: 8.0.0beta4: "copy" and "client_encoding" (Oliver Jowett <oliver@opencloud.com>) |
| Список | pgsql-jdbc |
On Thursday 04 November 2004 11:17, Oliver Jowett wrote:
>[...]
> 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.
How about relaxing so that things like this are alright:
st.executeUpdate('SET CLIENT_ENCODING TO 'whatever'; COPY/...; SET
CLIENT_ENCODING TO 'UNICODE');
Or - I'm surprised to see that this doesn't work - calling a function that
does the trick:
create or replace function copy_enc(varchar,varchar) RETURNS void AS ' set
client_encoding TO ''LATIN1'';set client_encoding TO ''UNICODE'';' LANGUAGE
SQL;
Uli
В списке pgsql-jdbc по дате отправления: