Re: OCTET_LENGTH is wrong - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: OCTET_LENGTH is wrong
Date
Msg-id 200111181530.fAIFUxb16988@candle.pha.pa.us
Whole thread Raw
In response to Re: OCTET_LENGTH is wrong  (Tatsuo Ishii <t-ishii@sra.co.jp>)
List pgsql-hackers
> > > BTW, I noticed that textlength() is absolutely unreasonably slow when
> > > MULTIBYTE is enabled --- yesterday I was trying to profile TOAST
> > > overhead, and soon discovered that what I was looking at was nothing
> > > but pg_mblen() calls.  It really needs a short-circuit path for
> > > single-byte encodings.
> > 
> > It's easy to optimize that. However I cannot access CVS anymore after
> > the IP address change. Will post patches later...
> 
> Seems I got the cvs access again (I was asked my pass phrase again)
> and I have committed changes for this.
> 
> Modified functions are:
> 
> bpcharlen
> textlen
> varcharlen

Did you go with the pre or post-TOAST length for these types?  I vote
for pre-TOAST because it seems much more useful to ordinary users.

--  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: bpalmer
Date:
Subject: Re: Call for testing
Next
From: Bruce Momjian
Date:
Subject: Re: OCTET_LENGTH is wrong