Re: Generic hash function? - Mailing list pgsql-novice

From Tom Lane
Subject Re: Generic hash function?
Date
Msg-id 24647.1165184110@sss.pgh.pa.us
Whole thread Raw
In response to Re: Generic hash function?  (Brian Hurt <bhurt@janestcapital.com>)
List pgsql-novice
Brian Hurt <bhurt@janestcapital.com> writes:
> Tom Lane wrote:
>> What for?

> What I'd like to write is [ x=y meaning x IS NOT DISTINCT FROM y ]

> Am I going to need to create an operator class for every type?

If you want it to be indexable you're going to have to do a lot more
work than that.  btree generally assumes that the comparison functions
are strict, and the other index AMs discriminate against nulls even
more strongly, eg, hash doesn't store nulls at all.  I think the hash
and merge join code is designed to ignore nulls as well.

On the whole you'd likely find it a lot simpler to reconsider the ways
your application is using NULL.  Assuming that NULL = NULL is
fundamentally against the SQL spec, and you will be forever swimming
upstream if you try to make PG handle it that way.

            regards, tom lane

pgsql-novice by date:

Previous
From: Brian Hurt
Date:
Subject: Re: Generic hash function?
Next
From: "Greg Quinn"
Date:
Subject: Default install options for silent install on Windows