Re: PATCH: CITEXT 2.0 - Mailing list pgsql-hackers

From Teodor Sigaev
Subject Re: PATCH: CITEXT 2.0
Date
Msg-id 486C7D7E.5080505@sigaev.ru
Whole thread Raw
In response to Re: PATCH: CITEXT 2.0  ("David E. Wheeler" <david@kineticode.com>)
Responses Re: PATCH: CITEXT 2.0  (Teodor Sigaev <teodor@sigaev.ru>)
Re: PATCH: CITEXT 2.0  ("David E. Wheeler" <david@kineticode.com>)
List pgsql-hackers
> Douglass book, though I probably missed it. Anyone got a link for me to 
> read to make it happen?

Hash opclass is 5-times simpler that btree one :)

CREATE FUNCTION citext_hash(mchar)
RETURNS int4
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT;

CREATE OPERATOR CLASS citext_ops
DEFAULT FOR TYPE mchar USING hash AS              OPERATOR        1       =  (citext, citext),              FUNCTION
   1       citext_hash(citext);
 


-- 
Teodor Sigaev                                   E-mail: teodor@sigaev.ru
  WWW: http://www.sigaev.ru/
 


pgsql-hackers by date:

Previous
From: "Ken Camann"
Date:
Subject: Re: A Windows x64 port of PostgreSQL
Next
From: Mark Mielke
Date:
Subject: Re: A Windows x64 port of PostgreSQL