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-17T17:16:31Z
Lists: pgsql-hackers
Chapman Flack <chap@anastigmatix.net> writes:
> What I was doing in the patch is the reverse: parsing with the expectation
> of CONTENT to see if a DTD gets tripped over. It isn't allowed for an
> element to precede a DTD, so that approach can be expected to fail fast
> if the other branch needs to be taken.

Ah, right.  I don't have any problem with trying the CONTENT approach
before the DOCUMENT approach rather than vice-versa.  What I was concerned
about was adding a lot of assumptions about exactly how libxml would
report the failure.  IMO a maximally-safe patch would just rearrange
things we're already doing without adding new things.

> But a quick pre-scan for the same thing would have the same property,
> without the libxml dependencies that bother you here. Watch this space.

Do we need a pre-scan at all?

			regards, tom lane


Commits

  1. Improve documentation about our XML functionality

  2. Improve documentation about our XML functionality.

  3. Doc: clarify that REASSIGN OWNED doesn't handle default privileges.

  4. Suppress Append and MergeAppend plan nodes that have a single child.

  5. Accept XML documents when xmloption = content, as required by SQL:2006+.

  6. Ensure xmloption = content while restoring pg_dump output.