Re: Ordering Results by a Supplied Order

From: Rémi Cura <remi(dot)cura(at)gmail(dot)com>
To: Vik Fearing <vik(dot)fearing(at)dalibo(dot)com>
Cc: Michael Sacket <msacket(at)gammastream(dot)com>, PG-General Mailing List <pgsql-general(at)postgresql(dot)org>
Subject: Re: Ordering Results by a Supplied Order
Date: 2014-02-06 12:45:14
Message-ID: CAJvUf_sE4dmkNGrSQRx3qq=ZtB9PAYg6LsrwZu3gq9J4Qu5+0Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Ok, thanks ^^

Cheers,
Rémi-C

2014-02-06 Vik Fearing <vik(dot)fearing(at)dalibo(dot)com>:

> 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
>
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Merlin Moncure 2014-02-06 14:51:37 Re: Offending My Tender Sensibilities -OR- OLTP on a Star Schema
Previous Message Adrian Klaver 2014-02-06 12:37:33 Re: Temporary table already exists