Re: [HACKERS] client_encoding directive is ignored in

2003-02-17 Thread Tom Lane
Tatsuo Ishii <[EMAIL PROTECTED]> writes: > 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. As long as it still behaves

Re: [HACKERS] client_encoding directive is ignored in

2003-02-17 Thread Tatsuo Ishii
> 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,

Re: [HACKERS] client_encoding directive is ignored in

2003-02-16 Thread Tom Lane
Tatsuo Ishii <[EMAIL PROTECTED]> writes: > Why? No matter how the backend's behavior regarding client_encoding > changes, libpq won't be affected by it since 7.2 and 7.3 libpq does > not use client_encoding anyway. Doesn't client_encoding determine what encoding the backend sends to the client? I

Re: [HACKERS] client_encoding directive is ignored in

2003-02-16 Thread Tatsuo Ishii
> > Actually the problem can be divided into two parts: > > 1) backend does not process GUC client_encoding. > > 2) libpq does not ask the backend's client_encoding, instead it asks > >datanbase encoding when it starts up the connection. This is just a > >mistake. > > > I think we could f

Re: [HACKERS] client_encoding directive is ignored in

2003-02-15 Thread Tom Lane
Tatsuo Ishii <[EMAIL PROTECTED]> writes: > Actually the problem can be divided into two parts: > 1) backend does not process GUC client_encoding. > 2) libpq does not ask the backend's client_encoding, instead it asks >datanbase encoding when it starts up the connection. This is just a >mis

Re: [HACKERS] client_encoding directive is ignored in

2003-02-15 Thread Tatsuo Ishii
> OK, can we better document that GUC client_encoding is broken, then fix > in 7.4? Actually the problem can be divided into two parts: 1) backend does not process GUC client_encoding. 2) libpq does not ask the backend's client_encoding, instead it asks datanbase encoding when it starts up t

Re: [HACKERS] client_encoding directive is ignored in

2003-02-15 Thread Bruce Momjian
OK, can we better document that GUC client_encoding is broken, then fix in 7.4? --- Tom Lane wrote: > Bruce Momjian <[EMAIL PROTECTED]> writes: > > Yep. Tatsuo, you should apply the patch to fix the problem. Shame this > >

Re: [HACKERS] client_encoding directive is ignored in

2003-02-14 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> writes: > Yep. Tatsuo, you should apply the patch to fix the problem. Shame this > didn't make it into 7.3.2. Should we backpatch? No. I'm not happy that we're breaking libpq for pre-7.2 servers, and I definitely don't want to see it done in 7.3. That's way t

Re: [HACKERS] client_encoding directive is ignored in

2003-02-14 Thread Bruce Momjian
Tatsuo Ishii wrote: > > Tatsuo Ishii <[EMAIL PROTECTED]> writes: > > > + /* Flag to we need to initialize client encoding info */ > > > + static bool need_to_init_client_encoding = -1; > > > > Surely that should be int, not bool. > > Oops. Will fix. > > > > !

Re: [HACKERS] client_encoding directive is ignored in postgresql.conf

2003-02-14 Thread Bruce Momjian
Tom Lane wrote: > Tatsuo Ishii <[EMAIL PROTECTED]> writes: > > + /* Flag to we need to initialize client encoding info */ > > + static bool need_to_init_client_encoding = -1; > > Surely that should be int, not bool. > > > ! if (!PQsendQuery(conn, "begin; select

Re: [HACKERS] client_encoding directive is ignored in

2003-01-29 Thread Tatsuo Ishii
> Tatsuo Ishii <[EMAIL PROTECTED]> writes: > > + /* Flag to we need to initialize client encoding info */ > > + static bool need_to_init_client_encoding = -1; > > Surely that should be int, not bool. Oops. Will fix. > > ! if (!PQsendQuery(conn, "begin; select >

Re: [HACKERS] client_encoding directive is ignored in postgresql.conf

2003-01-29 Thread Tom Lane
Tatsuo Ishii <[EMAIL PROTECTED]> writes: > + /* Flag to we need to initialize client encoding info */ > + static bool need_to_init_client_encoding = -1; Surely that should be int, not bool. > ! if (!PQsendQuery(conn, "begin; select >pg_client_encoding(); commi

[HACKERS] client_encoding directive is ignored in postgresql.conf

2003-01-29 Thread Tatsuo Ishii
There is a nasty bug with the client_encoding directive in postgresql.conf. It is simply ignored. This bug exists in both 7.3 or later and in current. Interesting thing is "show client_encoding" command shows expected encoding but this only shows the GUC internal variable and the actual internal en