pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedno ORDER BY in subselects?
3+ messages / 3 participants
[nested] [flat]
* no ORDER BY in subselects?
@ 2000-09-20 13:23 Louis-David Mitterrand <cunctator@apartia.ch>
0 siblings, 2 replies; 3+ messages in thread
From: Louis-David Mitterrand @ 2000-09-20 13:23 UTC (permalink / raw)
To: pgsql-sql
auction=# SELECT (select b.lot from bid b where b.auction_id = a.id and b.person_id = buyer.id order by b.price limit 1) as last_lot,auction_status(a.id) > 0 AS current, a.lot, a.person_id, next_price(a.id), seller.mail AS seller_mail, buyer.mail AS buyer_mail, seller.locale AS seller_locale, buyer.login AS buyer_login, num_bid(a.id), seller.login AS seller_login, t.name AS auction_type FROM auction* a, person seller, person buyer, auction_type t WHERE a.id = 84 AND seller.id = a.person_id AND COALESCE(a.type,1) = t.id AND buyer.id = 2;
ERROR: parser: parse error at or near "order"
Aren't ORDER BY clauses allowed in subselects?
--
Louis-David Mitterrand - ldm@apartia.org - http://www.apartia.org
Black holes are where God divided by zero.
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: no ORDER BY in subselects?
@ 2000-09-20 14:41 Tom Lane <tgl@sss.pgh.pa.us>
parent: Louis-David Mitterrand <cunctator@apartia.ch>
1 sibling, 0 replies; 3+ messages in thread
From: Tom Lane @ 2000-09-20 14:41 UTC (permalink / raw)
To: ldm@apartia.ch; +Cc: pgsql-sql
Louis-David Mitterrand <cunctator@apartia.ch> writes:
> Aren't ORDER BY clauses allowed in subselects?
No. This is per SQL92...
regards, tom lane
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: no ORDER BY in subselects?
@ 2000-09-20 14:43 Philip Warner <pjw@rhyme.com.au>
parent: Louis-David Mitterrand <cunctator@apartia.ch>
1 sibling, 0 replies; 3+ messages in thread
From: Philip Warner @ 2000-09-20 14:43 UTC (permalink / raw)
To: ldm@apartia.ch; pgsql-sql
At 15:23 20/09/00 +0200, Louis-David Mitterrand wrote:
>
>ERROR: parser: parse error at or near "order"
>
>Aren't ORDER BY clauses allowed in subselects?
>
It is a very very sad fact, but, no, they're not.
----------------------------------------------------------------
Philip Warner | __---_____
Albatross Consulting Pty. Ltd. |----/ - \
(A.B.N. 75 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 |/
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2000-09-20 14:43 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2000-09-20 13:23 no ORDER BY in subselects? Louis-David Mitterrand <cunctator@apartia.ch>
2000-09-20 14:41 ` Tom Lane <tgl@sss.pgh.pa.us>
2000-09-20 14:43 ` Philip Warner <pjw@rhyme.com.au>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox