Re: [SQL] Limit doesn't work with select unions - Mailing list pgsql-sql

From Oleg Bartunov
Subject Re: [SQL] Limit doesn't work with select unions
Date
Msg-id Pine.GSO.3.96.SK.991025130114.21751K-100000@ra
Whole thread Raw
In response to Limit doesn't work with select unions  (Postgres <postgres@weblynk.com>)
List pgsql-sql
It's fixed in current 6.5 sources. Wait for 6.5.3 or just
get REL6_5 tree from cvs
Oleg

On Mon, 25 Oct 1999, Postgres wrote:

> Date: Mon, 25 Oct 1999 01:27:40 -0700
> From: Postgres <postgres@weblynk.com>
> To: "pgsql-sql@postgresql.org" <pgsql-sql@postgreSQL.org>
> Subject: [SQL] Limit doesn't work with select unions
> 
> I'm doing the following query:
> select a.id, cfs.id from cfs where a.id = cfs.oid union select b.id, cfs.id
> from cfs where b.id = cfs.oid limit 1;
> The limit basically doesn't work. I get the maximum amount of rows back.
> I try the query
> select a.id, cfs.id from cfs where a.id = cfs.oid limit 1 union select b.id,
> cfs.id from cfs where b.id = cfs.oid limit 1;
> and psql says the syntax is incorrect. Any ideas on how to use limit with
> union queries?
> Thanks,
> Rich
> 
> 
> 
> 
> ************
> 

_____________________________________________________________
Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
Sternberg Astronomical Institute, Moscow University (Russia)
Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83



pgsql-sql by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: [SQL] possible bug?
Next
From: Postgres
Date:
Subject: Vacuum takes more than 1 hr