Subselect and limit/order? - Mailing list pgsql-sql

From Philip Warner
Subject Subselect and limit/order?
Date
Msg-id 3.0.5.32.20000808004355.02772100@mail.rhyme.com.au
Whole thread Raw
List pgsql-sql
Just wondering why subselect expressions can not have a limit/order clause,
eg.
   select id,(select id from tbl where id > ? order by id limit 1) as nextid    from tbl where id = ?;

is quite usefull.

It can obviously be done in two select statements, but I was just wondering
if it's an oversight or a planner problem?



----------------------------------------------------------------
Philip Warner                    |     __---_____
Albatross Consulting Pty. Ltd.   |----/       -  \
(A.C.N. 008 659 498)             |          /(@)   ______---_
Tel: (+61) 0500 83 82 81         |                 _________  \
Fax: (+61) 0500 83 82 82         |                 ___________ |
Http://www.rhyme.com.au          |                /           \|                                |    --________--
PGP key available upon request,  |  /
and from pgp5.ai.mit.edu:11371   |/


pgsql-sql by date:

Previous
From: Philip Warner
Date:
Subject: Re: Functions too slow, even with iscachable?
Next
From: "Ross J. Reedstrom"
Date:
Subject: Re: Functions too slow, even with iscachable?