-
- Downloads
Clean up rewriter routines to use expression_tree_walker and
expression_tree_mutator rather than ad-hoc tree walking code. This shortens the code materially and fixes a fair number of sins of omission. Also, change modifyAggrefQual to *not* recurse into subselects, since its mission is satisfied if it removes aggregate functions from the top level of a WHERE clause. This cures problems with queries of the form SELECT ... WHERE x IN (SELECT ... HAVING something-using-an-aggregate), which would formerly get mucked up by modifyAggrefQual. The routine is still fundamentally broken, of course, but I don't think there's any way to get rid of it before we implement subselects in FROM ...
Showing
- src/backend/rewrite/locks.c 61 additions, 76 deletionssrc/backend/rewrite/locks.c
- src/backend/rewrite/rewriteHandler.c 511 additions, 1551 deletionssrc/backend/rewrite/rewriteHandler.c
- src/backend/rewrite/rewriteManip.c 395 additions, 817 deletionssrc/backend/rewrite/rewriteManip.c
- src/include/rewrite/rewriteManip.h 12 additions, 13 deletionssrc/include/rewrite/rewriteManip.h
Loading
Please register or sign in to comment