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