postgresql/src
Tom Lane 07a3af0ff8 Fix parsetree representation of XMLTABLE(XMLNAMESPACES(DEFAULT ...)).
The original coding for XMLTABLE thought it could represent a default
namespace by a T_String Value node with a null string pointer.  That's
not okay, though; in particular outfuncs.c/readfuncs.c are not on board
with such a representation, meaning you'll get a null pointer crash
if you try to store a view or rule containing this construct.

To fix, change the parsetree representation so that we have a NULL
list element, instead of a bogus Value node.

This isn't really a functional limitation since default XML namespaces
aren't yet implemented in the executor; you'd just get "DEFAULT
namespace is not supported" anyway.  But crashes are not nice, so
back-patch to v10 where this syntax was added.  Ordinarily we'd consider
a parsetree representation change to be un-backpatchable; but since
existing releases would crash on the way to storing such constructs,
there can't be any existing views/rules to be incompatible with.

Per report from Andrey Lepikhov.

Discussion: https://postgr.es/m/3690074f-abd2-56a9-144a-aa5545d7a291@postgrespro.ru
2018-09-17 13:16:32 -04:00
..
backend Fix parsetree representation of XMLTABLE(XMLNAMESPACES(DEFAULT ...)). 2018-09-17 13:16:32 -04:00
bin Remove dead code from pop_next_work_item(). 2018-09-17 12:43:07 -04:00
common Allow concurrent-safe open() and fopen() in frontend code for Windows 2018-09-14 10:04:14 +09:00
fe_utils Fix lexing of standard multi-character operators in edge cases. 2018-08-23 21:42:40 +01:00
include Fix parsetree representation of XMLTABLE(XMLNAMESPACES(DEFAULT ...)). 2018-09-17 13:16:32 -04:00
interfaces Attempt to identify system timezone by reading /etc/localtime symlink. 2018-09-13 12:36:21 -04:00
makefiles Refactor installation of extension headers. 2018-09-07 14:19:14 +01:00
pl Fix out-of-tree build for transform modules. 2018-09-16 18:46:45 +01:00
port Fix inconsistent argument naming. 2018-09-06 11:14:22 -04:00
template Force "restrict" not to be used when compiling with xlc. 2017-10-13 12:15:06 -07:00
test Fix failure with initplans used conditionally during EvalPlanQual rechecks. 2018-09-15 13:42:33 -04:00
timezone Update time zone data files to tzdata release 2018e. 2018-05-09 13:56:22 -04:00
tools Fix out-of-tree build for transform modules. 2018-09-16 18:46:45 +01:00
tutorial Deduplicate "invalid input syntax" messages for various types. 2018-07-22 14:58:01 -07:00
.gitignore
DEVELOPERS Replace a couple of references to files that no longer exist in the source 2009-05-04 08:08:47 +00:00
Makefile Fix partial-build problems introduced by having more generated headers. 2018-04-09 16:42:10 -04:00
Makefile.global.in Ensure we build generated headers at the start of some more cases. 2018-07-30 18:04:39 -04:00
Makefile.shlib Use -Bsymbolic for shared libraries on HP-UX and Solaris. 2018-09-10 22:22:12 -04:00
nls-global.mk nls-global.mk: search build dir for source files, too 2016-06-07 18:55:18 -04:00