Re: encoding of PostgreSQL messages

Поиск
Список
Период
Сортировка
Искать
От
Hiroshi Inoue
Тема
Re: encoding of PostgreSQL messages
Дата
Msg-id
49831889.2020103@tpf.co.jp
Ответ на
Список
Дерево обсуждения
encoding of PostgreSQL messages Karsten Hilbert <Karsten.Hilbert@gmx.net>
Re: encoding of PostgreSQL messages Alvaro Herrera <alvherre@commandprompt.com>
Re: encoding of PostgreSQL messages Karsten Hilbert <Karsten.Hilbert@gmx.net>
Re: encoding of PostgreSQL messages Alvaro Herrera <alvherre@commandprompt.com>
Re: encoding of PostgreSQL messages Karsten Hilbert <Karsten.Hilbert@gmx.net>
Re: encoding of PostgreSQL messages Tom Lane <tgl@sss.pgh.pa.us>
Re: encoding of PostgreSQL messages "Karsten Hilbert" <Karsten.Hilbert@gmx.net>
Re: encoding of PostgreSQL messages Peter Eisentraut <peter_e@gmx.net>
Re: encoding of PostgreSQL messages Tom Lane <tgl@sss.pgh.pa.us>
Re: encoding of PostgreSQL messages "Karsten Hilbert" <Karsten.Hilbert@gmx.net>
Re: encoding of PostgreSQL messages "Karsten Hilbert" <Karsten.Hilbert@gmx.net>
Re: encoding of PostgreSQL messages Peter Eisentraut <peter_e@gmx.net>
Re: encoding of PostgreSQL messages Karsten Hilbert <Karsten.Hilbert@gmx.net>
Re: encoding of PostgreSQL messages Bruce Momjian <bruce@momjian.us>
Re: encoding of PostgreSQL messages Hiroshi Inoue <inoue@tpf.co.jp>
Re: encoding of PostgreSQL messages Bruce Momjian <bruce@momjian.us>
Re: encoding of PostgreSQL messages Peter Eisentraut <peter_e@gmx.net>
Re: encoding of PostgreSQL messages Tom Lane <tgl@sss.pgh.pa.us>
Re: encoding of PostgreSQL messages Karsten Hilbert <Karsten.Hilbert@gmx.net>
Re: encoding of PostgreSQL messages Hiroshi Inoue <inoue@tpf.co.jp>
Re: encoding of PostgreSQL messages Hiroshi Inoue <inoue@tpf.co.jp>
Re: encoding of PostgreSQL messages Tom Lane <tgl@sss.pgh.pa.us>
Re: encoding of PostgreSQL messages Hiroshi Inoue <inoue@tpf.co.jp>
Re: encoding of PostgreSQL messages Karsten Hilbert <Karsten.Hilbert@gmx.net>
Re: encoding of PostgreSQL messages Peter Eisentraut <peter_e@gmx.net>
Re: encoding of PostgreSQL messages Tom Lane <tgl@sss.pgh.pa.us>
Re: encoding of PostgreSQL messages Peter Eisentraut <peter_e@gmx.net>
How to check if 2 series of data are equal "Paolo Saudin" <paolo@ecometer.it>
Re: How to check if 2 series of data are equal Adrian Klaver <aklaver@comcast.net>
R: How to check if 2 series of data are equal "Paolo Saudin" <paolo@ecometer.it>
Re: R: How to check if 2 series of data are equal Adrian Klaver <aklaver@comcast.net>
R: R: How to check if 2 series of data are equal "Paolo Saudin" <paolo@ecometer.it>
Re: R: R: How to check if 2 series of data are equal Adrian Klaver <aklaver@comcast.net>
R: R: R: How to check if 2 series of data are equal "Paolo Saudin" <paolo@ecometer.it>
Re: R: R: How to check if 2 series of data are equal Octavio Alvarez <alvarezp@alvarezp.ods.org>
Re: How to check if 2 series of data are equal Sam Mason <sam@samason.me.uk>
Re: encoding of PostgreSQL messages Hiroshi Inoue <inoue@tpf.co.jp>
Re: encoding of PostgreSQL messages Karsten Hilbert <Karsten.Hilbert@gmx.net>
Re: encoding of PostgreSQL messages Peter Eisentraut <peter_e@gmx.net>
Re: encoding of PostgreSQL messages Hiroshi Inoue <inoue@tpf.co.jp>
Re: encoding of PostgreSQL messages "Karsten Hilbert" <Karsten.Hilbert@gmx.net>
Re: encoding of PostgreSQL messages John DeSoi <desoi@pgedit.com>
Hi,

This topic seems to be related to the bug report
    [ODBC] Localized error messages, wrong charset
.

Bruce Momjian wrote:
> Added to TODO:
> 
> 	Improve encoding of connection startup messages sent to the client
> 	
> 	    Currently some authentication error messages are sent in the server
> 	    encoding

It it true ?
IIRC the backend knows nothing about the server encoding in
authentication phase.

Psqlodbc Unicode driver sends connection startup message which
contains the client_encoding(=UTF8) guc parameter. Attached is
  a trial patch so that the psqlodbc Unicode driver can get
properly localized password error messages.

regards,
Hiroshi Inoue
Index: postmaster/postmaster.c
===================================================================
RCS file: /projects/cvsroot/pgsql/src/backend/postmaster/postmaster.c,v
retrieving revision 1.570
diff -c -c -r1.570 postmaster.c
*** postmaster/postmaster.c	4 Jan 2009 22:19:59 -0000	1.570
--- postmaster/postmaster.c	30 Jan 2009 14:05:35 -0000
***************
*** 1552,1557 ****
--- 1552,1560 ----
  											pstrdup(nameptr));
  				port->guc_options = lappend(port->guc_options,
  											pstrdup(valptr));
+ 				if (stricmp(nameptr, "client_encoding") == 0 &&
+ 				    stricmp(valptr, "UTF8") == 0)
+ 					bind_textdomain_codeset(PG_TEXTDOMAIN("postgres"), "UTF-8");
  			}
  			offset = valoffset + strlen(valptr) + 1;
  		}
В списке pgsql-general по дате отправления
От: A B
Дата:
Сообщение: Re: Runaway postgres process?
От: Asko Oja
Дата:
Сообщение: Re: database/table snapshot
FAQ