Re: any way for ORDER BY x to imply NULLS FIRST in 8.3?

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Simon Riggs <simon(at)2ndquadrant(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, rihad <rihad(at)mail(dot)ru>, pgsql-general(at)postgresql(dot)org
Subject: Re: any way for ORDER BY x to imply NULLS FIRST in 8.3?
Date: 2007-11-07 13:38:59
Message-ID: 200711071338.lA7DcxY25571@momjian.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-general

Simon Riggs wrote:
> If an application has already made that choice then we should allow them
> the opportunity to work with PostgreSQL. The application may be at
> fault, but PostgreSQL is the loser because of that decision.
>
> The SQL Standard says that the default for this is defined by the
> implementation; that doesn't bar us from changing the implementation if
> we wish. We can do that without changing PostgreSQL's historic default.
>
> Perhaps we can have a parameter?
>
> default_null_sorting = 'last' # may alternatively be set to 'first'
>
> (or another wording/meaning.)
>
> That is what I thought you'd implemented, otherwise I would have
> suggested this myself way back. This new parameter would be a small
> change, but will make a major difference to application portability.
>
> This seems like the key to unlocking your new functionality for most
> people.

You already have that control at the SQL SELECT level so you are just
avoiding typing to add the GUC parameter. I think we need more requests
for such a feature before we add it.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://postgres.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message cyclix 2007-11-07 13:50:46 Re: subversion support?
Previous Message Alvaro Herrera 2007-11-07 13:36:54 Re: Syntax error in a large COPY