Re: Fix XML handling with DOCTYPE
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Chapman Flack <chap@anastigmatix.net>
Cc: Ryan Lambert <ryan@rustprooflabs.com>, pgsql-hackers@postgresql.org
Date: 2019-03-17T19:06:07Z
Lists: pgsql-hackers
Chapman Flack <chap@anastigmatix.net> writes: > On 03/17/19 13:16, Tom Lane wrote: >> Do we need a pre-scan at all? > Without it, we double the time to a failure result in every case that > should actually fail, as well as in this one corner case that we want to > see succeed, and the question you posed earlier about which error message > to return becomes thornier. I have absolutely zero concern about whether it takes twice as long to detect bad input; nobody should be sending bad input if they're concerned about performance. (The costs of the ensuing transaction abort would likely dwarf xml_in's runtime in any case.) Besides, with what we're talking about doing here, (1) the extra runtime is consumed only in cases that would fail up to now, so nobody can complain about a performance regression; (2) doing a pre-scan *would* be a performance regression for cases that work today; not a large one we hope, but still... The error message issue is indeed a concern, but I don't see why it's complicated if you agree that > If the query asked for CONTENT, any error result should be one you could get > when parsing as CONTENT. That just requires us to save the first error message and be sure to issue that one not the DOCUMENT one, no? That's what we'd want to do from a backwards-compatibility standpoint anyhow, since that's the error message wording you'd get with today's code. regards, tom lane
Commits
-
Improve documentation about our XML functionality
- 728c49779ba8 11.6 landed
- 603a28b44973 10.11 landed
-
Improve documentation about our XML functionality.
- 12d46ac392d0 12.0 landed
-
Doc: clarify that REASSIGN OWNED doesn't handle default privileges.
- 50973687f185 9.6.13 cited
- 24df8662e4a4 11.3 cited
-
Suppress Append and MergeAppend plan nodes that have a single child.
- 8edd0e79460b 12.0 cited
-
Accept XML documents when xmloption = content, as required by SQL:2006+.
- 8d1dadb25bb5 12.0 landed
- da45927cef78 9.5.17 landed
- d7cfd5ee4591 9.6.13 landed
- 849f87a1c334 11.3 landed
- 78f84fe0f478 9.4.22 landed
- 754ffcd42006 10.8 landed
-
Ensure xmloption = content while restoring pg_dump output.
- 4870dce37fab 12.0 landed
- 8ba485422933 9.4.22 landed
- 08d8cfe3cfd6 9.5.17 landed
- de922529fe62 10.8 landed
- 7c89f350f109 11.3 landed
- 687acb598308 9.6.13 landed