Re: String encoding during connection "handshake"

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: String encoding during connection "handshake"
Дата
Msg-id 20071128152037.GD31742@svana.org
обсуждение исходный текст
Ответ на Re: String encoding during connection "handshake"  (sulfinu@gmail.com)
Ответы Re: String encoding during connection "handshake"  (sulfinu@gmail.com)
Список pgsql-hackers
On Wed, Nov 28, 2007 at 11:39:33AM +0200, sulfinu@gmail.com wrote:
> During the authentication phase, no such conversion takes place - you were
> right and I couldn't believe it! In the case when your database name, your
> user name or password contain non-ASCII characters, you're out of luck if the
> stored values were submitted in another encoding by the administrator.

The problem is, what conversion. You don't know the encoding of the
server yet (because you havn't selected a DB) and you don't know the
encoding to the client. The only real possibility is to declare One
True Encoding and decree every username/password be in that. But you're
never going to get people to agree on that.

> I assume that no names conversion takes place between client and cluster
> metadata when a role is created (CREATE ROLE... PASSWORD...) or when a
> database is created (CREATE DATABASE...). Or does it? In that case, the names
> are encoded in the encoding of the database that the administrator was
> connected to.

Honestly, UNIX usernames/passwords have always worked like this so
we're not really doing anything wierd by doing it this way. Users need
to type the password in the same encoding it was added. It not usually
a big deal because people set their own passwords...

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Those who make peaceful revolution impossible will make violent revolution inevitable.
>  -- John F Kennedy

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

Предыдущее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: pgwin32_open returning EINVAL
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: pgwin32_open returning EINVAL