Re: String encoding during connection "handshake"
От | Martijn van Oosterhout |
---|---|
Тема | Re: String encoding during connection "handshake" |
Дата | |
Msg-id | 20071127145848.GC19328@svana.org обсуждение исходный текст |
Ответ на | String encoding during connection "handshake" (sulfinu@gmail.com) |
Ответы |
Re: String encoding during connection "handshake"
|
Список | pgsql-hackers |
On Tue, Nov 27, 2007 at 02:51:32PM +0200, sulfinu@gmail.com wrote: > Simply put, what is the client encoding that the server assumes BEFORE the > client connection is established, that is, during the authentication phase? I > know there's a "client_encoding" setting on the server side that indicates > the encoding used in the communication stream, but its default value is the > database's encoding. Which is not known before the user gets authenticated > and the "logical" connection is actually made. I was under the impression that the username/password, had no encoding, they are Just a Bunch of Bits, i.e. byte[]. Hence it is not relevent what encoding the database is, it depends what encoding the DB admin was using when the user was created. That solves your md5 problem. Looking at it another way, the encoding is part of the password. The correctly entered password in the wrong encoding is also wrong, because the matching is done at the byte level. So I suppose the answer is: whatever encoding you would like it to be/what the DB admin uses. This is all AIUI, 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 по дате отправления: