From: Oleg Bartunov <oleg@sai.msu.su>
To: Postgres <postgres@weblynk.com>
Cc: pgsql-sql@postgresql.org <pgsql-sql@postgreSQL.org>
Subject: Re: [SQL] Limit doesn't work with select unions
Date: Mon, 25 Oct 1999 13:02:50 +0400 (MSD)
Message-ID: <Pine.GSO.3.96.SK.991025130114.21751K-100000@ra> (raw)
In-Reply-To: <071a01bf1ec2$ce0cd760$9befaace@usedcars.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: oleg@sai.msu.su, postgres@weblynk.com
Subject: Re: [SQL] Limit doesn't work with select unions
In-Reply-To: <Pine.GSO.3.96.SK.991025130114.21751K-100000@ra>
References: <071a01bf1ec2$ce0cd760$9befaace@usedcars.com> <Pine.GSO.3.96.SK.991025130114.21751K-100000@ra>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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