Re: [HACKERS] Clarification of NULL values

Поиск
Список
Период
Сортировка
От adrian@hottub.org
Тема Re: [HACKERS] Clarification of NULL values
Дата
Msg-id fb920dfd5ff7910c753c956751a6ffef
обсуждение исходный текст
Ответ на [HACKERS] Clarification of NULL values  (bibach@execpc.com)
Список pgsql-hackers
> >
> Yeah, I think they do that mostly to keep everyone happy.  If the
> language is very vague, then it is almost impossible to create
> something that DOESN'T comply with the standard, due to the incredible
> range of possible interpretations.
> In any case, I did want to make the point that I DON'T think Postgres
> is doing this correctly right now, as I believe the examples in the
> original posting showed the NULL-valued records at the end of the
> sorted list both when sorted ascending and descending.  I believe the
> standard is saying that NULLs should always be either at the beginning
> or end of sorts, and thus at OPPOSITE ends of ascending and descending
> sorts.
>

You know that interpretation thing....

If you look at other standards for interpretation, for example the JDBC
standards, there are four possibilities:

    NULLs sort high
    NULLs sort low
    NULLs always at end
    NULLs always at beginning

I think the standard says "do what you want, high or low, beginning or
end - as long as you are consistent"

Adrian

------------------------------

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