Search Postgresql Archives

Re: Nulls in timestamps

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



markMLl.pgsql-general@xxxxxxxxxxxxxxx writes:
> Where does PostgreSQL rank nulls when sorting a column of timestamps, is this
> behaviour deterministic, and can I rely on it not changing in the future?

Nulls sort high (in any datatype, not only timestamps).  It's possible
that we'd offer an option to make them sort low in the future, but I
can't imagine that we'd change the default behavior.

regression=# (select 1 as x union select null) order by x;
 x
---
 1

(2 rows)

regression=# (select 1 as x union select null) order by x desc;
 x
---

 1
(2 rows)

regression=#

			regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

               http://archives.postgresql.org

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux