Re: Latest on CITEXT 2.0 - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Latest on CITEXT 2.0
Date
Msg-id 17935.1214499739@sss.pgh.pa.us
Whole thread Raw
In response to Re: Latest on CITEXT 2.0  ("David E. Wheeler" <david@kineticode.com>)
Responses Re: Latest on CITEXT 2.0  ("David E. Wheeler" <david@kineticode.com>)
Re: Latest on CITEXT 2.0  ("Marko Kreen" <markokr@gmail.com>)
List pgsql-hackers
"David E. Wheeler" <david@kineticode.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


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Planner creating ineffective plans on LEFT OUTER joins
Next
From: "David E. Wheeler"
Date:
Subject: Re: Latest on CITEXT 2.0