pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Loles <lolesft@gmail.com>
To: pgsql-admin@postgresql.org
Subject: Re: ORDER BY DESC and NULLS LAST by default
Date: Fri, 27 Oct 2023 17:54:36 +0200
Message-ID: <02b23b24c9c76b5101b8ca784dfc9f52e65c68c4.camel@cybertec.at> (raw)
In-Reply-To: <CA+FWGK7A=MYMZieF1qKz55cPH-WtJQbLzjXQLAU5o2_14mstZw@mail.gmail.com>
References: <CA+FWGK7A=MYMZieF1qKz55cPH-WtJQbLzjXQLAU5o2_14mstZw@mail.gmail.com>

On Fri, 2023-10-27 at 16:16 +0200, Loles wrote:
> 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?

That is not simple.

You'd have to create new data types with new operators that do just the
opposite of the normal ones.  I'd advise against it.

Yours,
Laurenz Albe





view thread (9+ messages)  latest in thread

Message-ID: <02b23b24c9c76b5101b8ca784dfc9f52e65c68c4.camel@cybertec.at>
Permalink:  ../02b23b24c9c76b5101b8ca784dfc9f52e65c68c4.camel@cybertec.at/
Also on:    postgresql.org/message-id/02b23b24c9c76b5101b8ca784dfc9f52e65c68c4.camel@cybertec.at

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: laurenz.albe@cybertec.at, lolesft@gmail.com
  Subject: Re: ORDER BY DESC and NULLS LAST by default
  In-Reply-To: <02b23b24c9c76b5101b8ca784dfc9f52e65c68c4.camel@cybertec.at>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox