Re: ORDER BY DESC and NULLS LAST by default

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Loles <lolesft(at)gmail(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: ORDER BY DESC and NULLS LAST by default
Date: 2023-10-27 18:08:19
Message-ID: 1586759.1698430099@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Loles <lolesft(at)gmail(dot)com> writes:
> 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.

There is no such setting, and we'd be unlikely to consider adding one.
Bitter experience has taught us that GUC parameters that change query
behavior are usually bad ideas. Also, the SQL standard says
explicitly that ASC is the default behavior.

regards, tom lane

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2023-10-27 18:34:46 Re: pg_restore -L reordering of the statements does not work
Previous Message David G. Johnston 2023-10-27 18:05:24 Re: ORDER BY DESC and NULLS LAST by default