David Rowley <dgrowle...@gmail.com> writes:
> I'm reasonably happy with the patch now, the only small niggles are maybe
> the Assert() is probably not so much needed as transformLimitClause() seems
> to coerce to int8 anyway, and recompute_limits() does not bother with the
> Assert() when it does the same thing, either way, it's certainly doing no
> harm. The other thing was the regression tests, I'd rather see the tests
> use 2 separate tables for the EXISTS checks, but this is likely only
> because I'm thinking of doing some work in the future to remove duplicate
> joins from queries, so perhaps it's fine for now.

> Good work. Marking as ready for committer.

I've committed this patch with small adjustments; mostly, making the
comments more explicit.  But I also reordered the operations so that the
LIMIT-ectomy can be performed even if we decide the targetlist is unsafe.
This is within simplify_EXISTS_query's stated charter: it does not have
to be all-or-nothing.

(On reflection, we could zap a constant limit even when there are GROUP BY
etc, but it's probably not worth worrying about.)

                        regards, tom lane


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to