Re: OCTET_LENGTH is wrong - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: OCTET_LENGTH is wrong
Date
Msg-id 200111210110.fAL1Apm02606@candle.pha.pa.us
Whole thread Raw
In response to Re: OCTET_LENGTH is wrong  (Hannu Krosing <hannu@tm.ee>)
List pgsql-hackers
> >>>>There have been three ideas of what octet_length() sould return:
> >>>>      1) compressed on-disk storage length
> >>>>      2) byte length in server-side encoding
> >>>>      3) byte length in client-side encoding
> >>>>
> >>...
> >>
> >>>>The open question is whether we should be doing #3.
> >>>>
> >>There is no question in my mind that (3) must be the result of
> >>octet_length(). Any of the other options may give an interesting result,
> >>but of no practical use to a client trying to retrieve data. And
> >>everything is a client!
> >>
> >
> >Also added to TODO:
> >
> >    * Make octet_length_client the same as octet_length() 
> >
> Will this break backward compatibility ?

Well, sort of.  7.1 had text returning compressed length.  We changed
that to server-side encoding in 7.2.  Changing that to client encoding
will break clients, but what meaningful thing could they do with the
server-side encoding?

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


pgsql-hackers by date:

Previous
From: Hannu Krosing
Date:
Subject: Re: OCTET_LENGTH is wrong
Next
From: Tatsuo Ishii
Date:
Subject: HISTORY addition