Re: LIMIT within UNION? - Mailing list pgsql-sql

From Tom Lane
Subject Re: LIMIT within UNION?
Date
Msg-id 9596.1031861899@sss.pgh.pa.us
Whole thread Raw
In response to Re: LIMIT within UNION?  (Andrew Perrin <clists@perrin.socsci.unc.edu>)
List pgsql-sql
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


pgsql-sql by date:

Previous
From: Andrew Perrin
Date:
Subject: Re: LIMIT within UNION?
Next
From: Josh Berkus
Date:
Subject: Re: LIMIT within UNION?