Skip site navigation (1) Skip section navigation (2)

Re: Generic hash function?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Brian Hurt <bhurt(at)janestcapital(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Generic hash function?
Date: 2006-12-03 22:15:10
Message-ID: 24647.1165184110@sss.pgh.pa.us (view raw, whole thread or download thread mbox)
Thread:
Lists: pgsql-novice
Brian Hurt <bhurt(at)janestcapital(dot)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

In response to

pgsql-novice by date

Next:From: Greg QuinnDate: 2006-12-05 19:28:44
Subject: Default install options for silent install on Windows
Previous:From: Brian HurtDate: 2006-12-03 21:47:40
Subject: Re: Generic hash function?

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group