postgresql/src/backend
Tom Lane 9c58101117 Fix mishandling of system columns in FDW queries.
postgres_fdw would send query conditions involving system columns to the
remote server, even though it makes no effort to ensure that system
columns other than CTID match what the remote side thinks.  tableoid,
in particular, probably won't match and might have some use in queries.
Hence, prevent sending conditions that include non-CTID system columns.

Also, create_foreignscan_plan neglected to check local restriction
conditions while determining whether to set fsSystemCol for a foreign
scan plan node.  This again would bollix the results for queries that
test a foreign table's tableoid.

Back-patch the first fix to 9.3 where postgres_fdw was introduced.
Back-patch the second to 9.2.  The code is probably broken in 9.1 as
well, but the patch doesn't apply cleanly there; given the weak state
of support for FDWs in 9.1, it doesn't seem worth fixing.

Etsuro Fujita, reviewed by Ashutosh Bapat, and somewhat modified by me
2014-11-22 16:01:05 -05:00
..
access No need to call XLogEnsureRecordSpace when the relation is unlogged. 2014-11-21 15:13:15 +02:00
bootstrap Revert "Fix bogus %name-prefix option syntax in all our Bison files." 2014-05-28 19:21:01 -04:00
catalog Revamp the WAL record format. 2014-11-20 18:46:41 +02:00
commands Add missing case for CustomScan. 2014-11-20 12:32:34 -05:00
executor Remove dead code supporting mark/restore in SeqScan, TidScan, ValuesScan. 2014-11-20 20:20:54 -05:00
foreign Implement IMPORT FOREIGN SCHEMA. 2014-07-10 15:01:43 -04:00
lib pgindent run for 9.4 2014-05-06 12:12:18 -04:00
libpq Message improvements 2014-11-11 20:02:30 -05:00
main Add a basic atomic ops API abstracting away platform/architecture details. 2014-09-25 23:49:05 +02:00
nodes Rearrange CustomScan API. 2014-11-21 18:21:46 -05:00
optimizer Fix mishandling of system columns in FDW queries. 2014-11-22 16:01:05 -05:00
parser Explicitly support the case that a plancache's raw_parse_tree is NULL. 2014-11-12 15:59:01 -05:00
po Translation updates 2014-11-16 21:32:51 -05:00
port Add a basic atomic ops API abstracting away platform/architecture details. 2014-09-25 23:49:05 +02:00
postmaster Eliminate one background-worker-related flag variable. 2014-10-04 21:25:41 -04:00
regex Fix incorrect search for "x?" style matches in creviterdissect(). 2014-09-23 20:26:14 -04:00
replication Revamp the WAL record format. 2014-11-20 18:46:41 +02:00
rewrite Clean up includes from RLS patch 2014-11-14 17:05:17 -05:00
snowball Finish adding file version information to installed Windows binaries. 2014-08-18 22:59:53 -04:00
storage Revamp the WAL record format. 2014-11-20 18:46:41 +02:00
tcop Explicitly support the case that a plancache's raw_parse_tree is NULL. 2014-11-12 15:59:01 -05:00
tsearch Cope with more than 64K phrases in a thesaurus dictionary. 2014-11-06 20:52:40 -05:00
utils Rearrange CustomScan API. 2014-11-21 18:21:46 -05:00
.gitignore Add gitignore for mingw/cygwin build outputs 2011-06-09 18:11:47 +02:00
common.mk Remove maintainer-check target, fold into normal build 2013-10-10 20:11:56 -04:00
Makefile Get rid of use of dlltool in Mingw builds. 2014-02-11 12:56:20 -05:00
nls.mk Add libpgcommon to backend gettext source files 2013-10-19 13:49:05 -04:00