Re: [PATCHES] CURRENT CVS: MULTIBYTE: CANT CONNECT....

From: Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp>
To: zakkr(at)zf(dot)jcu(dot)cz
Cc: pgman(at)candle(dot)pha(dot)pa(dot)us, pgsql-hackers(at)postgresql(dot)org, pgsql-patches(at)postgresql(dot)org
Subject: Re: [PATCHES] CURRENT CVS: MULTIBYTE: CANT CONNECT....
Date: 2001-09-10 06:50:46
Message-ID: 20010910155046Q.t-ishii@sra.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers pgsql-patches

> > Why? set_default_client_encoding does the job anyway.
>
> Here can't be used static default encoding as for DatabaseEncoding, because
> typical code is
>
> if (!ClientEncoding)
> /* ...means "if user doesn't set itself client
> * encoding by SET command"
> */
> ClientEncoding = DatabaseEncoding;
>
> and if you set anywhere before this as default
> ClientEncoding = &pg_enc2name_tbl[ PG_SQL_ASCII ]; the ClientEncoding will
> always TRUE and always SQL_ASCII and the only way is change it by 'SET
> CLIENT_ENCODING' command. But we don't want it, wanted is after connection
> set as default ClientEncoding same encoding as actual DabaseEncoding.

Don't worry about that. Before anything user could do, postgres's
start up procedure sets the appropreate encoding to ClientEncoding
variable.

Also please note that "wanted is after connection set as default
ClientEncoding same encoding as actual DabaseEncoding" is not
corrent. The ClientEncoding might be set differently if
PGCLIENTENCODING is set before postmaster starts up.
--
Tatsuo Ishii

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Karel Zak 2001-09-10 07:13:00 Re: [PATCHES] CURRENT CVS: MULTIBYTE: CANT CONNECT....
Previous Message Karel Zak 2001-09-10 06:27:52 Re: [PATCHES] CURRENT CVS: MULTIBYTE: CANT CONNECT....

Browse pgsql-hackers by date

  From Date Subject
Next Message Karel Zak 2001-09-10 07:13:00 Re: [PATCHES] CURRENT CVS: MULTIBYTE: CANT CONNECT....
Previous Message Tatsuo Ishii 2001-09-10 06:40:16 COMMENT ON

Browse pgsql-patches by date

  From Date Subject
Next Message Karel Zak 2001-09-10 07:13:00 Re: [PATCHES] CURRENT CVS: MULTIBYTE: CANT CONNECT....
Previous Message Karel Zak 2001-09-10 06:27:52 Re: [PATCHES] CURRENT CVS: MULTIBYTE: CANT CONNECT....