Re: [HACKERS] Clarification of NULL values - Mailing list pgsql-hackers

From adrian@hottub.org
Subject Re: [HACKERS] Clarification of NULL values
Date
Msg-id 0e9ee17c745967e80cd78a40502ce933
Whole thread Raw
In response to [HACKERS] Clarification of NULL values  (bibach@execpc.com)
List 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 by date:

Previous
From: hakan@twins.iconsult.com (Hakan Tandogan)
Date:
Subject: Re: [HACKERS] Third Party Stuff
Next
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] 6.1 jumbo patch?