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

From bibach@execpc.com
Subject [HACKERS] Clarification of NULL values
Date
Msg-id 72101220f0d2437096faf50cdb5f106a
Whole thread Raw
List pgsql-hackers
>
> >From X3H2-97-030 (I think)
>             c) Let P be any row of TS and let Q be any other row of TS,
>               and let PVi and QVi be the values of Ki in these rows,
>               respectively. The relative position of rows P and Q in the
>               result is determined by comparing PVi and QVi according to
>               the rules of Subclause 8.2, "<comparison predicate>", where
>               the <comp op> is the applicable <comp op> for Ki, with the
>               following special treatment of null values. Whether a sort
>               key value that is null is considered greater or less than
>               a non-null value is implementation-defined, but all sort
>               key values that are null shall either be considered greater
>               than all non-null values or be considered less than all non-
>               null values. PVi is said to precede QVi if the value of the
>               <comparison predicate> "PVi <comp op> QVi" is true for the
>               applicable <comp op>.
> And if anyone can follow that.......
> Adrian
>
Basically, it means that NULLs are always to be treated as greater or
less than any non-NULL value.  Which of these it is is up to the
programmer/designer, but it must be consistant.  Otherwise stated,
regardless of NULLs, a set of records should always sort in the same
relative order, ascending or descending.
(Gee, that ALMOST made more sense than the standard text... *sigh*)

- -Brandon :)

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

pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] Database Restore with 6.1 fails (Name -> name).
Next
From: Sean Reifschneider
Date:
Subject: Re: [HACKERS] Database Restore with 6.1 fails (Name -> name).