Re: Can't ri_KeysEqual() consider two nulls as equal?

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: Can't ri_KeysEqual() consider two nulls as equal?
Дата
Msg-id 20070418075029.E83588@megazone.bigpanda.com
обсуждение исходный текст
Ответ на Can't ri_KeysEqual() consider two nulls as equal?  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Can't ri_KeysEqual() consider two nulls as equal?  (David Fetter <david@fetter.org>)
Re: Can't ri_KeysEqual() consider two nulls as equal?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Tue, 17 Apr 2007, Tom Lane wrote:

> A recent discussion led me to the idea that FK triggers are fired
> unnecessarily during an UPDATE if the foreign-key column(s) contain
> any NULLs, because ri_KeysEqual() treats two nulls as unequal,
> and therefore we conclude the row has changed when it has not.
> I claim that both ri_KeysEqual() and ri_OneKeyEqual() could consider
> two nulls to be equal.  Furthermore it seems like ri_AllKeysUnequal()
> should do so too; the case can't arise at the moment because the sole
> caller already knows that one of the key sets contains no nulls, but
> if this weren't so, the optimization would be actively wrong if we
> concluded that two nulls were unequal.

Do you have any suggestions for alternate names? Keeping them using Equal
seems to be dangerous since people would likely expect it to act like
normal equality (with nulls being different).


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Robert Treat
Дата:
Сообщение: Re: Autovacuum vs statement_timeout
Следующее
От: Robert Treat
Дата:
Сообщение: Re: Autovacuum vs statement_timeout