postgresql/src/include
Tom Lane 58fec95268 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
..
access Perform a lot more sanity checks when freezing tuples. 2017-12-14 18:20:48 -08:00
bootstrap Fix off-by-one loop count in MapArrayTypeName, and get rid of static array. 2014-12-16 15:35:36 -05:00
catalog Fix bogus provolatile/proparallel markings on a few built-in functions. 2018-03-30 18:14:51 -04:00
commands Mark assorted variables PGDLLIMPORT. 2017-12-05 09:35:15 -05:00
common Fix integer-overflow problems in interval comparison. 2017-04-05 23:51:28 -04:00
datatype pgindent run for 9.4 2014-05-06 12:12:18 -04:00
executor Fix WHERE CURRENT OF when the referenced cursor uses an index-only scan. 2018-03-17 14:59:31 -04:00
fe_utils Empty search_path in Autovacuum and non-psql/pgbench clients. 2018-02-26 07:39:48 -08:00
foreign Update copyright for 2014 2014-01-07 16:05:30 -05:00
lib pgindent run for 9.4 2014-05-06 12:12:18 -04:00
libpq Give nicer error message when connecting to a v10 server requiring SCRAM. 2017-05-05 11:24:29 +03:00
mb pgindent run for 9.4 2014-05-06 12:12:18 -04:00
nodes Change more places to be less trusting of RestrictInfo.is_pushed_down. 2018-04-20 15:19:17 -04:00
optimizer Fix incorrect handling of join clauses pushed into parameterized paths. 2018-04-19 15:49:12 -04:00
parser pgindent run for 9.4 2014-05-06 12:12:18 -04:00
port Improve TranslateSocketError() to handle more Windows error codes. 2016-04-21 16:59:04 -04:00
portability pgindent run for 9.4 2014-05-06 12:12:18 -04:00
postmaster Mark assorted variables PGDLLIMPORT. 2017-12-05 09:35:15 -05:00
regex Suppress compiler warnings about useless comparison of unsigned to zero. 2016-02-15 17:11:52 -05:00
replication Fix failure to delete spill files of aborted transactions 2018-01-05 12:17:10 -03:00
rewrite pgindent run for 9.4 2014-05-06 12:12:18 -04:00
snowball pgindent run for 9.4 2014-05-06 12:12:18 -04:00
storage Mark assorted variables PGDLLIMPORT. 2017-12-05 09:35:15 -05:00
tcop Mark assorted variables PGDLLIMPORT. 2017-12-05 09:35:15 -05:00
tsearch Allow opclasses to provide tri-valued GIN consistent functions. 2014-03-12 17:51:30 +02:00
utils Revert "Add temporary debug logging, in 9.4 branch only." 2018-04-18 11:57:37 -04:00
.gitignore Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
c.h Make [U]INT64CONST safe for use in #if conditions. 2017-09-01 15:14:18 -04:00
fmgr.h Revert addition of PGDLLEXPORT in PG_FUNCTION_INFO_V1 macro. 2016-10-12 18:02:12 -04:00
funcapi.h Add a utility function to extract variadic function arguments 2017-10-25 07:20:48 -04:00
getaddrinfo.h Fix assorted issues in client host name lookup. 2014-04-02 17:11:24 -04:00
getopt_long.h Centralize getopt-related declarations in a new header file pg_getopt.h. 2014-02-15 14:31:30 -05:00
Makefile Empty search_path in Autovacuum and non-psql/pgbench clients. 2018-02-26 07:39:48 -08:00
miscadmin.h Mark assorted variables PGDLLIMPORT. 2017-12-05 09:35:15 -05:00
pg_config.h.in Avoid SIGBUS on Linux when a DSM memory request overruns tmpfs. 2017-09-25 16:09:20 -04:00
pg_config.h.win32 Fix up ecpg's configuration so it handles "long long int" in MSVC builds. 2018-02-27 16:46:52 -05:00
pg_config_ext.h.in Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
pg_config_ext.h.win32 Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
pg_config_manual.h Further reduce the number of semaphores used under --disable-spinlocks. 2016-04-18 13:33:07 -04:00
pg_getopt.h Fix comment. 2014-05-08 12:42:56 -04:00
pg_trace.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
pgstat.h Don't reset changes_since_analyze after a selective-columns ANALYZE. 2016-06-06 17:44:17 -04:00
pgtar.h Adopt the GNU convention for handling tar-archive members exceeding 8GB. 2015-11-21 20:22:39 -05:00
pgtime.h Mark assorted variables PGDLLIMPORT. 2017-12-05 09:35:15 -05:00
port.h Revert error-throwing wrappers for the printf family of functions. 2015-05-19 18:16:19 -04:00
postgres.h Adjust DatumGetBool macro, this time for sure. 2016-04-28 11:51:13 -04:00
postgres_ext.h pgindent run for 9.4 2014-05-06 12:12:18 -04:00
postgres_fe.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
rusagestub.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
windowapi.h Update copyright for 2014 2014-01-07 16:05:30 -05:00