Skip site navigation (1) Skip section navigation (2)

Re: [HACKERS] union and LIMIT problem

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] union and LIMIT problem
Date: 1999-11-30 02:34:48
Message-ID: 18929.943929288@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> Can I assume this is fixed?  I see it marked on the TODO list.

Yes, I think it is (barring a counterexample from someone ... the
UNION rewriter is awfully crufty ...).

It might be nice to allow LIMIT to be attached to subselects rather
than just the top level, but I have no idea what it would take in the
executor to implement that.  I could handle fixing the parser & planner
if someone else wants to fix it in the executor.

>> Does anybody know how to use UNION and LIMIT together ?
>> 
>> select msg_id from publications union 
>> select key_id from keys         limit 10
>> produces something I wasn't expected

			regards, tom lane

Responses

pgsql-hackers by date

Next:From: Bruce MomjianDate: 1999-11-30 02:40:55
Subject: Re: [HACKERS] IN clause and INTERSECT not behaving as expected
Previous:From: Tom LaneDate: 1999-11-30 02:30:58
Subject: Re: [HACKERS] Tricky query, tricky response

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group