summaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorTom Lane2016-10-20 21:17:50 +0000
committerTom Lane2016-10-20 21:18:14 +0000
commitf17c26dbd6ce08c723b34a08d8dbac5deab9d8c6 (patch)
tree3523754f45caa8b7c203255943dae9db55a85251 /doc/src
parentb2aee4cb684e06b00e85d5e7c0de114b5df6010a (diff)
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>
Diffstat (limited to 'doc/src')
0 files changed, 0 insertions, 0 deletions