pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Chapman Flack <chap@anastigmatix.net>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Ryan Lambert <ryan@rustprooflabs.com>
Cc: pgsql-hackers@postgresql.org
Subject: Re: Fix XML handling with DOCTYPE
Date: Sat, 23 Mar 2019 17:53:24 -0400
Message-ID: <5C96AAD4.1090006@anastigmatix.net> (raw)
In-Reply-To: <12135.1553374744@sss.pgh.pa.us>
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>
	<31664.1552842991@sss.pgh.pa.us>
	<5C8E8E2F.9050600@anastigmatix.net>
	<25228.1552849567@sss.pgh.pa.us>
	<5C8ECAA4.3090301@anastigmatix.net>
	<5C8FD4EE.7090107@anastigmatix.net>
	<12135.1553374744@sss.pgh.pa.us>

On 03/23/19 16:59, Tom Lane wrote:
> Unicode-code-point numbers.  I removed that, made some other changes to
> bring the patch more in line with PG coding style, and pushed it.

Thanks! It looks good. I'm content with the extra PI checking being gone.

The magic Unicode-code-point numbers come straight from the XML standard;
I couldn't make that stuff up. :)

> > You're not really validating that the input
> is something that libxml would accept, unless its processing of XML PIs
> is far stupider than I would expect it to be.

Out of curiosity, what further processing would you expect libxml to do?

XML parsers are supposed to be transparent PI-preservers, except in the
rare case of seeing a PI that actually means something to the embedding
application, which isn't going to be the case for a database simply
implementing an XML data type.

The standard literally requires that the target must be a NAME, and
can't match [Xx][Mm][Ll], and if there's whitespace and anything after
that, there can't be an embedded ?> ... and that's it.

Regards,
-Chap




view thread (49+ messages)  latest in thread

Message-ID: <5C96AAD4.1090006@anastigmatix.net>
Permalink:  ../5C96AAD4.1090006@anastigmatix.net/
Also on:    postgresql.org/message-id/5C96AAD4.1090006@anastigmatix.net

 · 

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: chap@anastigmatix.net, tgl@sss.pgh.pa.us, ryan@rustprooflabs.com
  Subject: Re: Fix XML handling with DOCTYPE
  In-Reply-To: <5C96AAD4.1090006@anastigmatix.net>

* 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