| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
| Cc: | 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:00:39 |
| Message-ID: | 24874.1006369239@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> Tom Lane writes:
>> What's bothering me right now is the difference between client and
>> server encodings.
> OCTET_LENGTH returns the size of its argument, not the size of some
> possible future shape of that argument.
That would serve equally well as an argument for returning the
compressed length of the string, I think. You'll need to do better.
My take on it is that when a particular client encoding is specified,
Postgres does its best to provide the illusion that your data actually
is stored in that encoding. If we don't make OCTET_LENGTH agree, then
we're breaking the illusion.
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Ross J. Reedstrom | 2001-11-21 19:29:10 | Re: beta3 |
| Previous Message | Peter Eisentraut | 2001-11-21 18:55:20 | Re: OCTET_LENGTH is wrong |