Re: Overriding natural order of query results for a subset - Mailing list pgsql-general

From Laura Smith
Subject Re: Overriding natural order of query results for a subset
Date
Msg-id Iw_TZN9JOOOQfQg8r_9MQJS3Wd8R5MU8O6zAg0nYziTVJ_XVeXyEvF3nItgN30oljmFNJq5MFdzDwCV9MaD6NIXka0uncdPsz0_ZdazXL2o=@protonmail.ch
Whole thread Raw
In response to Re: Overriding natural order of query results for a subset  (Adrian Klaver <adrian.klaver@aklaver.com>)
Responses Re: Overriding natural order of query results for a subset
List pgsql-general
‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Saturday, 29 May 2021 17:06, Adrian Klaver <adrian.klaver@aklaver.com> wrote:

> On 5/29/21 9:00 AM, Laura Smith wrote:
>
> > I did try "nulls last" but will give it another go, maybe I messed up on the ordering of clauses.
>
> Unless the fields you are ordering on contain NULLs I'm not sure how
> this is going to deal with your issue.
>


Reading between the lines of the poster who suggested it, I'm guessing the suggestion was to add an "int" column, most
ofwhich is null except for numbers where needed for ordering and then having "order by vip_num_order,order by
last_name"in my select clause. 



pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: AWS forcing PG upgrade from v9.6 a disaster
Next
From: Adrian Klaver
Date:
Subject: Re: Overriding natural order of query results for a subset