From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andrew Perrin <clists@perrin.socsci.unc.edu>
Cc: Stephan Szabo <sszabo@megazone23.bigpanda.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: LIMIT within UNION?
Date: Thu, 12 Sep 2002 16:18:19 -0400
Message-ID: <9596.1031861899@sss.pgh.pa.us> (raw)
In-Reply-To: <Pine.LNX.4.21.0209121601370.32000-100000@perrin.socsci.unc.edu>
References: <Pine.LNX.4.21.0209121601370.32000-100000@perrin.socsci.unc.edu>
Andrew Perrin <clists@perrin.socsci.unc.edu> writes:
> Interesting - this would count on the UNION including all cases in the
> first query before those in the second query. Are UNIONed records
> presented in any predictable order?
If you can use UNION ALL then this would be pretty safe to rely on.
If you must use UNION (to eliminate dups) then it won't work.
regards, tom lane
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 using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: tgl@sss.pgh.pa.us, clists@perrin.socsci.unc.edu, sszabo@megazone23.bigpanda.com
Subject: Re: LIMIT within UNION?
In-Reply-To: <9596.1031861899@sss.pgh.pa.us>
* 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