Re: Ordering Results by a Supplied Order - Mailing list pgsql-general

From Vik Fearing
Subject Re: Ordering Results by a Supplied Order
Date
Msg-id 52F35C0C.9060201@dalibo.com
Whole thread Raw
In response to Re: Ordering Results by a Supplied Order  (Rémi Cura <remi.cura@gmail.com>)
Responses Re: Ordering Results by a Supplied Order
List pgsql-general
On 02/06/2014 10:00 AM, Rémi Cura wrote:
> Hey,
>  I don"t understand the difference between this ORDINALITY option and
> adding a "row_number() over()" in the SELECT.

WITH ORDINALITY will give you something to order by.  You should never
do "row_number() over ()" because that will give you potentially random
results.

--
Vik



pgsql-general by date:

Previous
From: Rémi Cura
Date:
Subject: Re: Hard upgrade (everything)
Next
From: mephysto
Date:
Subject: Re: Temporary table already exists