postgresql/src
Tom Lane 3852eaba10 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:08 -05:00
..
backend Fix mishandling of system columns in FDW queries. 2014-11-22 16:01:08 -05:00
bin Fix bug in the test of file descriptor of current WAL file in pg_receivexlog. 2014-11-19 19:11:03 +09:00
common Small message fixes 2014-08-09 00:07:29 -04:00
include Stamp 9.4rc1. 2014-11-17 15:54:40 -05:00
interfaces Translation updates 2014-11-16 21:31:08 -05:00
makefiles MinGW: Use -static-libgcc when linking a DLL. 2014-10-21 22:56:42 -04:00
pl Translation updates 2014-11-16 21:31:08 -05:00
port Fix win32setlocale.c const-related warnings. 2014-11-02 21:44:21 -05:00
template Revert to using --enable-auto-import in Cygwin builds. 2014-02-16 15:14:04 -05:00
test Don't require bleeding-edge timezone data in timestamptz regression test. 2014-11-18 21:36:43 -05:00
timezone Update time zone data files to tzdata release 2014j. 2014-11-17 12:09:17 -05:00
tools Rework 'MOVE ALL' to 'ALTER .. ALL IN TABLESPACE' 2014-08-21 19:12:00 -04:00
tutorial pgindent run for 9.4 2014-05-06 12:12:18 -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 Add configure --enable-tap-tests option 2014-11-02 09:17:49 -05:00
Makefile.shlib MinGW: Include .dll extension in .def file LIBRARY commands. 2014-10-27 19:59:52 -04:00
nls-global.mk Setup error context callback for transaction lock waits 2014-03-19 15:10:36 -03:00
win32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00