JDBC: what exactly does nullsAreSortedHigh() return?

From: vikasrana(at)techie(dot)com (Vikas Rana)
To: pgsql-general(at)postgresql(dot)org
Subject: JDBC: what exactly does nullsAreSortedHigh() return?
Date: 2004-06-03 06:25:50
Message-ID: f8961319.0406022225.3b5cfde0@posting.google.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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?

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Roshani Shah 2004-06-03 06:43:46 Request
Previous Message Tom Lane 2004-06-03 04:54:43 Re: statement-level statistics are disabled error (postgresql.conf)