Re: OCTET_LENGTH is wrong

From: Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp>
To: peter_e(at)gmx(dot)net
Cc: tgl(at)sss(dot)pgh(dot)pa(dot)us, barry(at)xythos(dot)com, pgsql-hackers(at)postgresql(dot)org
Subject: Re: OCTET_LENGTH is wrong
Date: 2001-11-21 23:36:20
Message-ID: 20011122083620V.t-ishii@sra.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2001-11-22 00:05:07 Re: Taking databases offline
Previous Message Bruce Momjian 2001-11-21 23:20:26 Re: beta3