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, 16 Mar 2019 23:50:15 -0400
Message-ID: <5C8DC3F7.9050604@anastigmatix.net> (raw)
In-Reply-To: <5C8D79AF.7010204@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>
On 03/16/19 18:33, Chapman Flack wrote:
> The pre-scan is a simple linear search and will ordinarily say yes or no
> within a couple dozen characters--you could *have* an input with 20k of
> leading whitespace and comments, but it's hardly the norm. Just trying to
If the available regexp functions want to start by munging the entire input
into a pg_wchar array, then it may be better to implement the pre-scan as
open code, the same way parse_xml_decl() is already implemented.
Given that parse_xml_decl() already covers the first optional thing that
can precede the doctype, the remaining scan routine would only need to
recognize comments, PIs, and whitespace. That would be pretty straightforward.
Regards,
-Chap
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: <5C8DC3F7.9050604@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