Re: A bad behavior under autocommit off mode

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: A bad behavior under autocommit off mode
Дата
Msg-id Pine.LNX.4.44.0303221737270.2352-100000@peter.localdomain
обсуждение исходный текст
Ответ на Re: A bad behavior under autocommit off mode  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: A bad behavior under autocommit off mode  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Tom Lane writes:

> I had originally been thinking of reporting client_encoding as a field
> of some message sent only at backend startup.  However, what if we send
> such a message whenever one of the variables it includes changes?

The silent assumption behind the client_encoding parameter is that you
must set it to the actual character set encoding used by the client.  If
you lie, the results are unspecified.  So if you're in a JDBC application
and set the client encoding to an encoding that the JDBC driver (that is,
"the client") cannot handle, you lied and you deserve to lose.  (Really,
this problem can only occur in applications that let random users enter
random commands or if a programmer is explicitly trying out forbidden
territory.)

There are real and valid reasons for changing the client encoding on the
fly, but that is no reason to make a big deal about passing the
information around all the time.

-- 
Peter Eisentraut   peter_e@gmx.net



В списке pgsql-hackers по дате отправления:

Предыдущее
От: elein
Дата:
Сообщение: Fwd: [GENERAL] statement id
Следующее
От: Tom Lane
Дата:
Сообщение: Re: A bad behavior under autocommit off mode