Null comparisons (was Re: checksum)

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Null comparisons (was Re: checksum)
Дата
Msg-id 20040927074416.C70916@megazone.bigpanda.com
обсуждение исходный текст
Ответ на Re: checksum  (Mike Rylander <mrylander@gmail.com>)
Ответы Re: Null comparisons (was Re: checksum)  (Greg Stark <gsstark@mit.edu>)
Список pgsql-general
On Mon, 27 Sep 2004, Mike Rylander wrote:

> On Sun, 26 Sep 2004 20:16:52 +0200, David Helgason <david@uti.is> wrote:

> > On a similar note, I've found myself wanting an extended '=' operator
> > meaning
> >         (a = b or (a is null and b is null))
> >
>
> Setting 'transform_null_equals' to true in postgresql.conf should do
> what you want.

Unfortunately, it probably won't.  That only changes the explicit token
sequence = NULL into an IS NULL, it won't help if you're doing a=b where a
or b may be NULL.

The original does appear to be equivalent to "not(a is distinct from b)",
although I'm not sure that's necessarily easier to use than the above.

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

Предыдущее
От: Andrew Sullivan
Дата:
Сообщение: Re: core dump on select
Следующее
От: Greg Stark
Дата:
Сообщение: Re: Null comparisons (was Re: checksum)