Re: SET within a function?

Поиск
Список
Период
Сортировка
От Dennis Gearon
Тема Re: SET within a function?
Дата
Msg-id 3F8D79A7.7080509@fireserve.net
обсуждение исходный текст
Ответ на Re: SET within a function?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Tom Lane wrote:

>Edmund Dengler <edmundd@eSentire.com> writes:
>
>
>>Normally, when I am comparing rows, I do want NULL <> NULL.
>>
>>
>
>No, you still haven't got the point.  NULL is not equal to NULL, and
>it is not not-equal-to NULL either.  The result of the comparison is
>NULL, not true or false.  This is consistent with the interpretation
>of NULL as "I don't know the value".  If you don't know what the value
>is, you also don't know whether it is equal to some other value.
>
>

In these cases, it is recommended to either find a value which is out of
range, normally, and use that in place of NULL. For examples:

-1
10^32-1
"."
the_oldest_possible_date BC
the_furthest_away_date AD

Another way is to put an additional column in, but I think this still
has problems if you are trying to get a query to return values in a
column that has NULLs and you are querying against the column that has
the NULLs.


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

Предыдущее
От: "scott.marlowe"
Дата:
Сообщение: Re: Cygwin? or paid version from SRA?
Следующее
От: Alejandro Forero Cuervo
Дата:
Сообщение: Getting error codes for failed queries?