Re: HASH index method not correctly handling NULL text - Mailing list pgsql-general

From Tom Lane
Subject Re: HASH index method not correctly handling NULL text
Date
Msg-id 21910.1012705778@sss.pgh.pa.us
Whole thread Raw
In response to Re: HASH index method not correctly handling NULL text  (Neil Conway <nconway@klamath.dyndns.org>)
Responses Re: HASH index method not correctly handling NULL text
Re: HASH index method not correctly handling NULL text
List pgsql-general
Neil Conway <nconway@klamath.dyndns.org> writes:
>> The warning should be suppressed for hash indexes, since they don't
>> include nulls.  I believe this is fixed in 7.2.

> Is there a reason why hash indexes don't include NULLs?

Nobody's got around to fixing them to do so.  AFAICS it should be easy
enough to do; just assign a fixed hash code (zero, likely) for NULLs,
and adjust the comparison routines to be NULL-conscious.

If you want to work on the hash index code, feel free.  My own vision
of things says that we should put our effort into the btree and GIST
index types, which really cover the scalar and multidimensional cases
pretty effectively.  If we had unlimited manpower then it'd be worth
working on hash and rtree too, but I'd be just as happy leaving them
to rot quietly.

But, as always, Postgres is a volunteer project, and the work that
gets done is whatever someone is interested/motivated to work on.
So if improving hash indexes is what floats your boat at the moment,
then by all means go for it.

            regards, tom lane

pgsql-general by date:

Previous
From: "Jeff Martin"
Date:
Subject: Re: PostgreSQL transaction locking problem
Next
From: Neil Conway
Date:
Subject: Re: HASH index method not correctly handling NULL text