ordering of selected rows from an ordered subselect

From: "Rajesh Kumar Mallah" <mallah(dot)rajesh(at)gmail(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: ordering of selected rows from an ordered subselect
Date: 2007-02-17 09:32:06
Message-ID: a97c77030702170132h51962513j929786b4f45aa50f@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hi,

we know that rows in a table are not stored in any particular order
and explicit order by clause is required to get data in any particular
order.

but does it apply to select queries from ordered subselects also ?
eg

select id , name , expensive_func(name) from
( select id , name from tab order by c1 desc limit 15) as foo ;

is it guaranteed that the final result is order by c1 ?

Regds
mallah.

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Louis-David Mitterrand 2007-02-17 12:56:35 sub-limiting a query
Previous Message Hiroshi Saito 2007-02-17 00:33:05 Re: Fwd: [ADMIN] Debug (is it PostgreSQL?)