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

From David G. Johnston
Subject Re: Overriding natural order of query results for a subset
Date
Msg-id CAKFQuwa2avyUMCWOx5WQhcKB_KkuO+2M1m6K--nNyC3kman-VQ@mail.gmail.com
Whole thread Raw
In response to Overriding natural order of query results for a subset  (Laura Smith <n5d9xq3ti233xiyif2vp@protonmail.ch>)
List pgsql-general

On Saturday, May 29, 2021, Laura Smith <n5d9xq3ti233xiyif2vp@protonmail.ch> wrote:

The problem is that my use-case calls for a scenario where due to protocol certain people may be designated as "VIP" and therefore need to appear at the top.  In addition, protocol may dictate that those "VIP" people themselves may (sometimes but not always) need to be ordered in a specific manner.

Add whatever attribute(s) determine vip status to your order by clause.

David J. 

pgsql-general by date:

Previous
From: Laura Smith
Date:
Subject: Overriding natural order of query results for a subset
Next
From: Michael van der Kolff
Date:
Subject: Re: Overriding natural order of query results for a subset