postgresql/src
Tom Lane 9680c120e5 Change more places to be less trusting of RestrictInfo.is_pushed_down.
On further reflection, commit e5d83995e didn't go far enough: pretty much
everywhere in the planner that examines a clause's is_pushed_down flag
ought to be changed to use the more complicated behavior where we also
check the clause's required_relids.  Otherwise we could make incorrect
decisions about whether, say, a clause is safe to use as a hash clause.

Some (many?) of these places are safe as-is, either because they are
never reached while considering a parameterized path, or because there
are additional checks that would reject a pushed-down clause anyway.
However, it seems smarter to just code them all the same way rather
than rely on easily-broken reasoning of that sort.

In support of that, invent a new macro RINFO_IS_PUSHED_DOWN that should
be used in place of direct tests on the is_pushed_down flag.

Like the previous patch, back-patch to all supported branches.

Discussion: https://postgr.es/m/f8128b11-c5bf-3539-48cd-234178b2314d@proxel.se
2018-04-20 15:19:17 -04:00
..
backend Change more places to be less trusting of RestrictInfo.is_pushed_down. 2018-04-20 15:19:17 -04:00
bin Fix make rules that generate multiple output files. 2018-03-23 13:45:38 -04:00
common Unlink static libraries before rebuilding them. 2015-03-01 13:06:39 -05:00
include Change more places to be less trusting of RestrictInfo.is_pushed_down. 2018-04-20 15:19:17 -04:00
interfaces In libpq, free any partial query result before collecting a server error. 2018-04-13 12:53:46 -04:00
makefiles Always use -fPIC, not -fpic, when building shared libraries with gcc. 2017-06-01 13:32:56 -04:00
pl Fix make rules that generate multiple output files. 2018-03-23 13:45:38 -04:00
port Enlarge find_other_exec's meager fgets buffer 2018-04-19 10:45:15 -03:00
template AIX: Test the -qlonglong option before use. 2015-07-17 03:02:03 -04:00
test Fix incorrect handling of join clauses pushed into parameterized paths. 2018-04-19 15:49:12 -04:00
timezone Update time zone data files to tzdata release 2018c. 2018-01-27 16:43:00 -05:00
tools Fix up ecpg's configuration so it handles "long long int" in MSVC builds. 2018-02-27 16:46:52 -05:00
tutorial Remove tabs after spaces in C comments 2014-05-06 11:26:28 -04:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
bcc32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
DEVELOPERS Replace a couple of references to files that no longer exist in the source 2009-05-04 08:08:47 +00:00
Makefile Create libpgcommon, and move pg_malloc et al to it 2013-02-12 11:21:05 -03:00
Makefile.global.in PL/Perl portability fix: absorb relevant -D switches from Perl. 2017-07-31 12:38:35 -04:00
Makefile.shlib Fix make rules that generate multiple output files. 2018-03-23 13:45:38 -04:00
nls-global.mk nls-global.mk: search build dir for source files, too 2016-06-07 18:55:18 -04:00
win32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00