Re: Latest on CITEXT 2.0

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "David E(dot) Wheeler" <david(at)kineticode(dot)com>
Cc: Martijn van Oosterhout <kleptog(at)svana(dot)org>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Latest on CITEXT 2.0
Date: 2008-06-26 17:02:19
Message-ID: 17935.1214499739@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"David E. Wheeler" <david(at)kineticode(dot)com> writes:
> Datum citext_ne (PG_FUNCTION_ARGS) {
> // Fast path for different-length inputs. Okay for canonical
> equivalence?
> if (VARSIZE(PG_GETARG_TEXT_P(0)) != VARSIZE(PG_GETARG_TEXT_P(1)))
> PG_RETURN_BOOL( 1 );
> PG_RETURN_BOOL( citextcmp( PG_ARGS ) != 0 );
> }

BTW, I don't think you can use that same-length optimization for
citext. There's no reason to think that upper/lowercase pairs will
have the same length all the time in multibyte encodings.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David E. Wheeler 2008-06-26 17:09:37 Re: Latest on CITEXT 2.0
Previous Message Tom Lane 2008-06-26 16:57:38 Re: Planner creating ineffective plans on LEFT OUTER joins