Re: Stable sort?

From: Richard Huxton <dev(at)archonet(dot)com>
To: redhog <redhog(at)redhog(dot)org>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Stable sort?
Date: 2006-11-08 08:50:39
Message-ID: 45519A5F.9080407@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

redhog wrote:
> Is sorting in PostgreSQL stable over subqueries, that is, is
>
> select * from (select * from A order by x) as B order by y;
>
> equivalent with
>
> select * from A order by y, x;

I don't see how it could be:
SELECT * FROM (SELECT * FROM a ORDER BY x DESC) AS B ORDER BY x ASC;

--
Richard Huxton
Archonet Ltd

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Teodor Sigaev 2006-11-08 09:28:01 Re: Tsearch Index Size and GiST vs. GIN
Previous Message Alban Hertroys 2006-11-08 08:42:02 Re: FOR ... IN