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

From adrian@hottub.org
Subject Re: [HACKERS] Clarification of NULL values
Date
Msg-id fb920dfd5ff7910c753c956751a6ffef
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: Bruce Momjian
Date:
Subject: Re: Re[2]: [HACKERS] Database Restore with 6.1 fails (Name -> na
Next
From: "Leo Shuster"
Date:
Subject: Re[2]: [HACKERS] Database Restore with 6.1 fails (Name -> na