Re: OCTET_LENGTH is wrong - Mailing list pgsql-hackers

From Tatsuo Ishii
Subject Re: OCTET_LENGTH is wrong
Date
Msg-id 20011122083620V.t-ishii@sra.co.jp
Whole thread Raw
In response to Re: OCTET_LENGTH is wrong  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
> 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


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: beta3
Next
From: Tom Lane
Date:
Subject: Re: Taking databases offline