subquery in limit - Mailing list pgsql-hackers

From Grzegorz Jaskiewicz
Subject subquery in limit
Date
Msg-id CA427916-56E1-4175-A6A3-1C29161E0E7D@pointblue.com.pl
Whole thread Raw
Responses Re: subquery in limit  ("Roberts, Jon" <Jon.Roberts@asurion.com>)
List pgsql-hackers
(just as an example):
select * from test order by a limit (select count(*)*0.9 from test);

is not doable in postgresql. Someone recently asked on IRC about,  
"SELECT TOP 90 PERCENT" type of query in m$sql.
Any ideas how should this be approach in psql. I ask here, because you  
guys probably can tell why the first query won't work (subquery is not  
allowed as limit's argument, why?).

cheers.

-- 
Grzegorz Jaskiewicz
gj@pointblue.com.pl





pgsql-hackers by date:

Previous
From: Richard Huxton
Date:
Subject: Re: wishlist for 8.4
Next
From: Sam Mason
Date:
Subject: Re: wishlist for 8.4