Re: PATCH: CITEXT 2.0
От | Alvaro Herrera |
---|---|
Тема | Re: PATCH: CITEXT 2.0 |
Дата | |
Msg-id | 20080703165315.GB18252@alvh.no-ip.org обсуждение исходный текст |
Ответ на | Re: PATCH: CITEXT 2.0 ("David E. Wheeler" <david@kineticode.com>) |
Ответы |
Re: PATCH: CITEXT 2.0
|
Список | pgsql-hackers |
David E. Wheeler wrote: > On Jul 3, 2008, at 00:19, Teodor Sigaev wrote: > >>> 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); > > Thanks. What would citext_hash() look like? I don't see a text_hash() to > borrow from anywhere in src/. See hash_any(). I assume the difficulty is making sure that hash("FOO") = hash("foo") ... -- Alvaro Herrera http://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom Development, 24x7 support
В списке pgsql-hackers по дате отправления: