Re: OCTET_LENGTH is wrong
От | Peter Eisentraut |
---|---|
Тема | Re: OCTET_LENGTH is wrong |
Дата | |
Msg-id | Pine.LNX.4.30.0111202251220.613-100000@peter.localdomain обсуждение исходный текст |
Ответ на | Re: OCTET_LENGTH is wrong (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: OCTET_LENGTH is wrong
Re: OCTET_LENGTH is wrong |
Список | pgsql-hackers |
Tom Lane writes: > What's bothering me right now is the difference between client and > server encodings. It seems that the only plausible use for > octet_length is to do memory allocation on the client side, and for > that purpose the length ought to be measured in the client encoding. OCTET_LENGTH returns the size of its argument, not the size of some possible future shape of that argument. There is absolutely no guarantee that the string that is processed by OCTET_LENGTH will ever reach any kind of client. There are procedural languages, for instance, or CREATE TABLE AS. Whether or not this behaviour is most likely or most useful is a different question, but let's not silently readopt standard functions for non-standard purposes -- we've just gotten past that one. -- Peter Eisentraut peter_e@gmx.net
В списке pgsql-hackers по дате отправления: