Re: Is there any chance to get some kind of a result set sifting mechanism in Postgres?

Поиск
Список
Период
Сортировка
От Isaac Morland
Тема Re: Is there any chance to get some kind of a result set sifting mechanism in Postgres?
Дата
Msg-id CAMsGm5c+-F8WUSnV+vqFLTck+g_6Vr+b7qZEbAooWdHgag-A8w@mail.gmail.com
обсуждение исходный текст
Ответ на Is there any chance to get some kind of a result set sifting mechanism in Postgres?  (aa <ghevge@gmail.com>)
Список pgsql-hackers
On Mon, 13 May 2024 at 04:40, aa <ghevge@gmail.com> wrote:
Hello Everyone!

Is there any chance to get some kind of a result set sifting mechanism in Postgres? 

What I am looking for is a way to get for example: "nulls last" in a result set, without having to call "order by" or having to use UNION ALL, and if possible to get this in a single result set pass.

Something on this line: SELECT a, b, c FROM my_table WHERE a nulls last OFFSET 0 LIMIT 25

I don't want to use order by or union all because these are time consuming operations, especially on  large data sets and when comparations are done on dynamic values (eg: geolocation distances in between a mobile and a static location) 

This already exists: ORDER BY a IS NULL

I've found it to be more useful than one might initially expect to order by a boolean expression.

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Jelte Fennema-Nio
Дата:
Сообщение: Re: Direct SSL connection with ALPN and HBA rules
Следующее
От: Matthias van de Meent
Дата:
Сообщение: Re: WAL_LOG CREATE DATABASE strategy broken for non-standard page layouts