postgresql/src
Tom Lane 677708032c Explicitly support the case that a plancache's raw_parse_tree is NULL.
This only happens if a client issues a Parse message with an empty query
string, which is a bit odd; but since it is explicitly called out as legal
by our FE/BE protocol spec, we'd probably better continue to allow it.

Fix by adding tests everywhere that the raw_parse_tree field is passed to
functions that don't or shouldn't accept NULL.  Also make it clear in the
relevant comments that NULL is an expected case.

This reverts commits a73c9dbab0 and
2e9650cbcf, which fixed specific crash
symptoms by hacking things at what now seems to be the wrong end, ie the
callee functions.  Making the callees allow NULL is superficially more
robust, but it's not always true that there is a defensible thing for the
callee to do in such cases.  The caller has more context and is better
able to decide what the empty-query case ought to do.

Per followup discussion of bug #11335.  Back-patch to 9.2.  The code
before that is sufficiently different that it would require development
of a separate patch, which doesn't seem worthwhile for what is believed
to be an essentially cosmetic change.
2014-11-12 15:59:01 -05:00
..
backend Explicitly support the case that a plancache's raw_parse_tree is NULL. 2014-11-12 15:59:01 -05:00
bin Add GUC and storage parameter to set the maximum size of GIN pending list. 2014-11-11 21:08:21 +09:00
common Small message fixes 2014-08-09 00:07:00 -04:00
include Explicitly support the case that a plancache's raw_parse_tree is NULL. 2014-11-12 15:59:01 -05:00
interfaces Make ECPG test programs depend on "ecpg$(X)", not "ecpg". 2014-11-02 21:43:25 -05:00
makefiles MinGW: Use -static-libgcc when linking a DLL. 2014-10-21 22:55:47 -04:00
pl Re-remove dependency on the DLL of pythonxx.def file. 2014-11-02 21:43:30 -05:00
port Fix win32setlocale.c const-related warnings. 2014-11-02 21:43:20 -05:00
template Remove Alpha and Tru64 support. 2014-06-28 21:46:15 +02:00
test Use just one database connection in the "tablespace" test. 2014-11-12 07:33:17 -05:00
timezone Support timezone abbreviations that sometimes change. 2014-10-16 15:22:10 -04:00
tools Add valgrind suppression for padding bytes in twophase records. 2014-09-01 15:59:44 +02:00
tutorial Adjust blank lines around PG_MODULE_MAGIC defines, for consistency 2014-07-10 14:02:08 -04:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
DEVELOPERS
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:26 -05:00
Makefile.shlib Clarify .def file comments. 2014-11-02 21:43:33 -05:00
bcc32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -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