Re: HASH index method not correctly handling NULL text

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Neil Conway <nconway(at)klamath(dot)dyndns(dot)org>, pgsql-general(at)postgresql(dot)org, david(dot)madore(at)ens(dot)fr
Subject: Re: HASH index method not correctly handling NULL text
Date: 2002-02-04 05:00:49
Message-ID: 200202040500.g1450nb19182@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tom Lane wrote:
> Neil Conway <nconway(at)klamath(dot)dyndns(dot)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.

The big question is how should we document the fact that hash isn't
recommended? We get periodic questions about it and I don't think the
FAQ is the place for it because it is something pretty fundamental we
should document.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2002-02-04 05:03:08 Re: Distributing index's/tables/logs/etc.
Previous Message Lincoln Yeoh 2002-02-04 04:59:38 Re: Distributing index's/tables/logs/etc.