Re: Generic hash function?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Generic hash function?
Дата
Msg-id 24647.1165184110@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Generic hash function?  (Brian Hurt <bhurt@janestcapital.com>)
Список 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 по дате отправления:

Предыдущее
От: Brian Hurt
Дата:
Сообщение: Re: Generic hash function?
Следующее
От: "Greg Quinn"
Дата:
Сообщение: Default install options for silent install on Windows