From: | Lee Fesperman <firstsql(at)ix(dot)netcom(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: JDBC: what exactly does nullsAreSortedHigh() return? |
Date: | 2004-06-03 08:06:55 |
Message-ID: | 40BEDB51.7757@ix.netcom.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Vikas Rana wrote:
>
> Hi all,
>
> I am a bit confused about the method
> java.sql.DatabaseMetaData.nullsAreSortedHigh(). What exactly does this
> return? If this returns true, are nulls considered as the highest
> value? Or does this mean that nulls comes first when sorted in
> ascending order (opposite in meaning to the first).
>
> Consider this.
>
> - Oracle returns false. Nulls are last when sorted in ascending order.
>
> - MSSQL2K returns true. Nulls are first when sorted in ascending
> order.
>
> - Postgres returns true. Nulls are last when sorted in ascending
> order.
>
> Now, behavior of Oracle and Postgres is same in terms of sort order,
> but they return different values.
>
> Who is right?
It seems that the Oracle driver is wrong. I interpret nullsAreSortedHigh() the same as
Postgres.
That is, a true return from nullsAreSortedHigh() means Nulls are last when sorted in
ascending order.
This is the interpretation that FirstSQL/J uses.
--
Lee Fesperman, FirstSQL, Inc. (http://www.firstsql.com)
==============================================================
* The Ultimate DBMS is here!
* FirstSQL/J Object/Relational DBMS (http://www.firstsql.com)
From | Date | Subject | |
---|---|---|---|
Next Message | Stefan Felkel | 2004-06-03 08:25:20 | zope, postgresql and idle connections |
Previous Message | Nagib Abi Fadel | 2004-06-03 07:04:43 | Re: Creating a session variable in Postgres |