| От | Tom Lane |
|---|---|
| Тема | Re: Nulls in timestamps |
| Дата | |
| Msg-id | 14088.1121276504@sss.pgh.pa.us обсуждение |
| Ответ на | Nulls in timestamps (markMLl.pgsql-general@telemetry.co.uk) |
| Ответы |
Re: Nulls in timestamps
|
| Список | pgsql-general |
markMLl.pgsql-general@telemetry.co.uk 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
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера