Re: client_encoding directive is ignored in

From: Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp>
To: tgl(at)sss(dot)pgh(dot)pa(dot)us
Cc: pgman(at)candle(dot)pha(dot)pa(dot)us, pgsql-hackers(at)postgresql(dot)org
Subject: Re: client_encoding directive is ignored in
Date: 2003-02-17 12:44:45
Message-ID: 20030217.214445.74754048.t-ishii@sra.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> But this argument is mostly irrelevant if the proposed change will not
> affect behavior in a default installation. I guess I'm not entirely
> clear on exactly which cases it will affect. What will your proposed
> change do in each possible combination (database encoding is SQL_ASCII
> or not, client_encoding is defined in postgresql.conf or not,
> PGCLIENTENCODING is set in postmaster's environment or not, etc)?

The database encoding is set to the encoding when the database was
created and the default value of the client encoding is set to same as
the database encoding. This behavior will not be changed by the change
I proposed.

Anyway I will list up none default behaviors.

case 1: PGCLIENTENCODING environment variable is set when postmaster
starts up

case 2: -c 'client_encoding=some_encoding is set when postmaster
starts up

case 3: PGOPTIONS environment variable is set frontend starts up

case 4: GUC variable client_encoding is set

current behavior: show client_encoding shows the encoding set by
PGCLIENTENCODING/postmaster opton/PGOPTIONS/GUC variable but
actual client encoding is same as the database encoding. Thus
pg_client_encoding() returns the database encoding. Also
client/database encoding conversion is not peformed(bug).

After changes: show client_encoding shows the encoding set by
PGCLIENTENCODING/postmaster opton/PGOPTIONS/GUC
variable. pg_client_encoding() returns the client encoding as
expected. Client/database encoding conversion will be peformed.

case 5: PGCLIENTENCODING environment variable is set frontend starts
up
case 6: SET client_encoding command is issued

current behavior: show client_encoding shows the encoding set by
PGCLIENTENCODING/SET command. pg_client_encoding() returns the
client encoding as expected. Client/database encoding conversion
will be peformed.

After changes: same as above.
--
Tatsuo Ishii

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruno Wolff III 2003-02-17 13:41:31 Re: Hard problem with concurrency
Previous Message Christopher Kings-Lynne 2003-02-17 12:25:14 Re: Questions about indexes?