"David E. Wheeler" <david@[EMAIL PROTECTED]
> writes:
> On Jul 3, 2008, at 09:53, Alvaro Herrera wrote:
>
>>> 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") =3D hash("foo") ...
>
> Great, big help, thank you. So does this look sensible?
>
> txt =3D cilower( PG_GETARG_TEXT_PP(0) );
> str =3D VARDATA_ANY(txt);
>
> result =3D hash_any((unsigned char *) str, VARSIZE_ANY_EXHDR(txt));
I thought your data type implemented a locale dependent collation, not
just
a case insensitive collation. That is, does this hash agree with your
citext_eq on strings like "foo bar" <=3D> "foobar" and "foo=DF" <=3D>
"foos=
s" ?
You may have to use strxfrm
--=20
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
Ask me about EnterpriseDB's PostGIS sup****t!
--=20
Sent via pgsql-hackers mailing list (pgsql-hackers@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


|