postgresql/src
Tom Lane 0336665151 Fix EXPLAIN so that it doesn't emit invalid XML in corner cases.
With track_io_timing = on, EXPLAIN (ANALYZE, BUFFERS) will emit fields
named like "I/O Read Time".  The slash makes that invalid as an XML
element name, so that adding FORMAT XML would produce invalid XML.

We already have code in there to translate spaces to dashes, so let's
generalize that to convert anything that isn't a valid XML name character,
viz letters, digits, hyphens, underscores, and periods.  We could just
reject slashes, which would run a bit faster.  But the fact that this went
unnoticed for so long doesn't give me a warm feeling that we'd notice the
next creative violation, so let's make it a permanent fix.

Reported by Markus Winand, though this isn't his initial patch proposal.

Back-patch to 9.2 where track_io_timing was added.  The problem is only
latent in 9.1, so I don't feel a need to fix it there.

Discussion: <E0BF6A45-68E8-45E6-918F-741FB332C6BB@winand.at>
2016-10-20 17:17:57 -04:00
..
backend Fix EXPLAIN so that it doesn't emit invalid XML in corner cases. 2016-10-20 17:17:57 -04:00
bin Fix pg_dump to work against pre-9.0 servers again. 2016-10-07 09:51:28 -04:00
common pgindent run for 9.6 2016-06-09 18:02:36 -04:00
fe_utils Fix assorted places in psql to print version numbers >= 10 in new style. 2016-08-16 15:58:46 -04:00
include Revert addition of PGDLLEXPORT in PG_FUNCTION_INFO_V1 macro. 2016-10-12 18:01:52 -04:00
interfaces In PQsendQueryStart(), avoid leaking any left-over async result. 2016-10-10 10:35:58 -04:00
makefiles Fix typos in comments and doc 2016-01-28 16:47:36 +09:00
pl Fix misplacement of submake-generated-headers prerequisites. 2016-10-01 13:35:20 -04:00
port Include <sys/select.h> where needed 2016-09-27 01:05:21 -03:00
template Remove some remains from Alpha support removal 2015-10-29 16:40:14 -04:00
test Fix WAL-logging of FSM and VM truncation. 2016-10-19 14:43:34 +03:00
timezone Sync our copy of the timezone library with IANA release tzcode2016h. 2016-10-20 15:40:14 -04:00
tools MSVC: Include pg_recvlogical in client-only install. 2016-09-19 14:27:04 -04:00
tutorial Update copyright for 2016 2016-01-02 13:33:40 -05: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 Install TAP test infrastructure so it's available for extension testing. 2016-09-23 15:50:00 -04:00
Makefile.global.in Make TAP test suites to work, when @INC does not contain current dir. 2016-10-07 22:01:04 +03:00
Makefile.shlib Fix misstatement in comment in Makefile.shlib. 2016-10-01 13:45:23 -04:00
nls-global.mk nls-global.mk: search build dir for source files, too 2016-06-07 18:55:18 -04:00
win32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00