Re: OCTET_LENGTH is wrong
От | Tom Lane |
---|---|
Тема | Re: OCTET_LENGTH is wrong |
Дата | |
Msg-id | 24874.1006369239@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | OCTET_LENGTH is wrong (Peter Eisentraut <peter_e@gmx.net>) |
Ответы |
Re: OCTET_LENGTH is wrong
|
Список | pgsql-hackers |
Peter Eisentraut <peter_e@gmx.net> writes: > Tom Lane writes: >> What's bothering me right now is the difference between client and >> server encodings. > OCTET_LENGTH returns the size of its argument, not the size of some > possible future shape of that argument. That would serve equally well as an argument for returning the compressed length of the string, I think. You'll need to do better. My take on it is that when a particular client encoding is specified, Postgres does its best to provide the illusion that your data actually is stored in that encoding. If we don't make OCTET_LENGTH agree, then we're breaking the illusion. regards, tom lane
В списке pgsql-hackers по дате отправления: