Re: ORDER BY DESC and NULLS LAST by default

Поиск
Список
Период
Сортировка
От Loles
Тема Re: ORDER BY DESC and NULLS LAST by default
Дата
Msg-id CA+FWGK4uAunKxZyPRv0vHqBXFJEFJkxyoB_k5XLSW+-HdeCDqg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: ORDER BY DESC and NULLS LAST by default  (Holger Jakobs <holger@jakobs.com>)
Ответы Re: ORDER BY DESC and NULLS LAST by default  ("David G. Johnston" <david.g.johnston@gmail.com>)
Re: ORDER BY DESC and NULLS LAST by default  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-admin
I was really wondering if, just like you can disable autocommit mode in PostgreSQL, if you could configure some parameter so that ORDER BY, by default, would order DESC instead of ASC.

I suppose there is always the option of downloading the source code, changing it, compiling and installing but it will undoubtedly be easier to use ORDER BY DESC in all queries ;)

Thank you very much for all your contributions to my question.

Happy weekend!


El vie, 27 oct 2023 a las 18:25, Holger Jakobs (<holger@jakobs.com>) escribió:
Actually, the behaviour isn't NULLS LAST, but NULLS GREATEST.

There is no setting for choosing NULLS SMALLEST.

If you choose NULLS LAST, they always appear at the end, regardless of ASC or DESC. NULLS FIRST does the opposite.

Regards,

Holger


Am 27. Oktober 2023 16:16:09 MESZ schrieb Loles <lolesft@gmail.com>:
Hi!

Can the server be configured so that the default ORDER BY option is DESC instead of ASC?

And to make it NULLS LAST instead of NULLS FIRST?

Happy weekend and Thank you very much!

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

Предыдущее
От: Holger Jakobs
Дата:
Сообщение: Re: ORDER BY DESC and NULLS LAST by default
Следующее
От: Aditya D
Дата:
Сообщение: pg_restore -L reordering of the statements does not work