Re: OCTET_LENGTH is wrong
От | Tom Lane |
---|---|
Тема | Re: OCTET_LENGTH is wrong |
Дата | |
Msg-id | 3411.1006110400@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: OCTET_LENGTH is wrong (Peter Eisentraut <peter_e@gmx.net>) |
Ответы |
Re: OCTET_LENGTH is wrong
|
Список | pgsql-hackers |
Peter Eisentraut <peter_e@gmx.net> writes: > I think "the value of S" implies "the user-accessible representation of > the value of S", in the sense, "How much memory do I need to allocate to > store this value". If I take that argument seriously, I have to conclude that OCTET_LENGTH should return the string length measured in the current client encoding (which may have little to do with its size in the server, if the server's encoding is different). If the client actually retrieves the string then that's how much memory he'll need. I presume that where you want to come out is OCTET_LENGTH = uncompressed length in the server's encoding ... but so far no one has really made a convincing argument why that answer is better or more spec-compliant than any other answer. In particular, it's not obvious to me why "number of bytes we're actually using on disk" is wrong. regards, tom lane
В списке pgsql-hackers по дате отправления: