Re: OCTET_LENGTH is wrong

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Barry Lind <barry(at)xythos(dot)com>, PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: OCTET_LENGTH is wrong
Date: 2001-11-21 19:31:18
Message-ID: 200111211931.fALJVIB02586@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

Yes, agreed. I argued that server-side octet_length would be valuable
for server-side functions. However, others felt client-side was more
important.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2001-11-21 19:33:37 Re: postgresql.conf (Proposed settings)
Previous Message Ross J. Reedstrom 2001-11-21 19:29:10 Re: beta3