Re: encoding of PostgreSQL messages

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: encoding of PostgreSQL messages
Дата
Msg-id 19896.1234107496@sss.pgh.pa.us
обсуждение исходный текст
Ответ на 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  (Hiroshi Inoue <inoue@tpf.co.jp>)
Re: encoding of PostgreSQL messages  (Hiroshi Inoue <inoue@tpf.co.jp>)
Re: encoding of PostgreSQL messages  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-general
Peter Eisentraut <peter_e@gmx.net> writes:
> Bruce Momjian wrote:
>> Can someone comment on this?

> Looks like a horrible hack to me.  Recoding stuff to the client encoding
> in the server outside the existing recoding mechanism looks pretty evil
> to me.  Plus, it does not address the problem of what happens to
> messages sent before this, it just moves the point of "before" a bit
> earlier for some special cases.

> I think we have discussed more proper solutions earlier in this thread.
>   IMO the best approach would be for the client to include the client
> encoding in the startup package.

Huh?  Clients already do that (or at least some are capable of it,
including libpq).  The hard problems are (1) there's still a "before",
ie we might fail before scanning the options in the packet, and (2)
the sent encoding might itself be invalid, and you still have to report
that somehow.

I believe the only real "fix" is to guarantee that messages are sent
as untranslated ASCII until we have sent an encoding indicator at
the end of the startup sequence.  Which has its own pretty clear
downside: no more translation of authorization failures.

            regards, tom lane

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

Предыдущее
От: Josh Harrison
Дата:
Сообщение: problem connecting oracle and postgres database
Следующее
От: Iñigo Barandiaran
Дата:
Сообщение: Re: Install Postgre while installing Other software.