Global setting for ORDER BY ... NULLS FIRST / LAST

From: Sebastien Flaesch <sebastien(dot)flaesch(at)4js(dot)com>
To: pgsql-sql <pgsql-sql(at)lists(dot)postgresql(dot)org>
Subject: Global setting for ORDER BY ... NULLS FIRST / LAST
Date: 2022-03-01 14:16:23
Message-ID: DBAP191MB12893AA929975291A05E2938B0029@DBAP191MB1289.EURP191.PROD.OUTLOOK.COM
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hello!

Is there a global PostgreSQL server setting or SQL session parameter that defines the default for ORDER BY ... NULLS FIRST / LAST ?

Assuming that it would be something like "NULL is lowest value, or NULL is highest value", to get the expected behavior when using ASC/DESC options of ORDER BY ...

That would help to migrate to PostgreSQL for DB engines having a different default behavior regarding NULL sorting.

Thanks!
Seb

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message David G. Johnston 2022-03-01 14:41:48 Re: Global setting for ORDER BY ... NULLS FIRST / LAST
Previous Message Jian He 2022-03-01 13:58:37 NORM(NO ORM) transform two one-many relationships into a single json.