> 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.
I think the essential problem with OCTET_LENGTH(and with any other
text functions) is we currently do not have a way to associate
encoding information with each text object. Probably we could solve
this after implementation of CREATE CHARACTER SET stuffs.
--
Tatsuo Ishii