Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> Rene Pijlman writes:
>> Currently the JDBC driver says:
>> - Backend >= 7.2 sorts nulls higher than any other value in a
>> domain. In other words: ascending means nulls at the end,
>> descending means nulls at the start.
>> - Backend < 7.2 puts nulls at the end regardless of sort order.
> That is correct.
Actually it's more complex than that. 7.2 will provide the above-stated
consistent ordering of nulls relative to non-nulls. The problem with
earlier versions is that the ordering of nulls depends on what plan the
optimizer chooses for the query: sorting based on a scan of a btree
index would work the same as is described for 7.2, whereas sorting
based on an explicit sort step would put the nulls at the end (for
either ASC or DESC sort). So there was *no* consistent behavior at all
in prior versions. The fix that's been applied for 7.2 is to make
explicit sorts act the same as indexscans already did.
regards, tom lane
In response to
pgsql-hackers by date
|Next:||From: Tom Lane||Date: 2001-09-16 05:22:35|
|Subject: Re: Warning about oid/xid wraparound |
|Previous:||From: Bruce Momjian||Date: 2001-09-16 05:05:07|
|Subject: Re: Warning about oid/xid wraparound|
pgsql-jdbc by date
|Next:||From: Bruce Momjian||Date: 2001-09-16 19:35:35|
|Subject: Re: UpdateableResultSet patch (not finished yet!)|
|Previous:||From: Rene Pijlman||Date: 2001-09-15 19:43:58|
|Subject: Re: isNullable()|