pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Chapman Flack <chap@anastigmatix.net>
Cc: Ryan Lambert <ryan@rustprooflabs.com>
Cc: pgsql-hackers@postgresql.org
Subject: Re: Fix XML handling with DOCTYPE
Date: Sun, 17 Mar 2019 13:16:31 -0400
Message-ID: <31664.1552842991@sss.pgh.pa.us> (raw)
In-Reply-To: <5C8E7FC0.8040401@anastigmatix.net>
References: <CAN-V+g-6JqUQEQZ55Q3toXEN6d5Ez5uvzL4VR+8KtvJKj31taw@mail.gmail.com>
	<5C8D5D16.7090206@anastigmatix.net>
	<23319.1552769738@sss.pgh.pa.us>
	<5C8D6681.4070504@anastigmatix.net>
	<24203.1552771272@sss.pgh.pa.us>
	<5C8D79AF.7010204@anastigmatix.net>
	<5146.1552837534@sss.pgh.pa.us>
	<5C8E7FC0.8040401@anastigmatix.net>

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




view thread (49+ messages)  latest in thread

Message-ID: <31664.1552842991@sss.pgh.pa.us>
Permalink:  ../31664.1552842991@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/31664.1552842991@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, chap@anastigmatix.net, ryan@rustprooflabs.com
  Subject: Re: Fix XML handling with DOCTYPE
  In-Reply-To: <31664.1552842991@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox