Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h7oaC-0003YP-Vl for pgsql-hackers@arkaria.postgresql.org; Sat, 23 Mar 2019 21:53:41 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1h7oaA-0005G9-GJ for pgsql-hackers@arkaria.postgresql.org; Sat, 23 Mar 2019 21:53:38 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h7oa9-0005G1-T9 for pgsql-hackers@lists.postgresql.org; Sat, 23 Mar 2019 21:53:38 +0000 Received: from anastigmatix.net ([68.171.219.55]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h7oa2-00033o-0c for pgsql-hackers@postgresql.org; Sat, 23 Mar 2019 21:53:37 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=anastigmatix.net; s=default; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:From:Cc:References:To:Subject:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=y/EQLXfpZF7gnM1lMxkJchqgaKD/dcScA9gIqQJ1tjc=; b=Lrk06pyHzrwcEmL9OVv1EG3yXg V1wDeKq4wRf+jFMllsvP5PJZ/mJxCmMXmMjD4Ycc+Dq1egrGy+j1QPaUEO6GJbk+ONR5Pk1u7ilbd EeoE7TJxNqlUiMqO8HjJSsyIM3FltorKWf2V1w7HKHcv5WMaT7unL4+G3i2FAMdGp6S+Mw4eP7l3p n3RbeUoJ06efnafHliHxEaPI0UeJz9qkY4REHx7LTaZl8pni1RhzB/cZ4Xmg3sNQYKc9ZJzCQwumh tFrKIBBjEoBXxk4njTQ1+zmHyUukG3Xdy7cu0QXjT0DjV8kGBdAHG6Siqzdv9DaMTbHI6M3hz5u1H uvr6I08Q==; Received: from [184.19.63.78] (port=50098) by bay.acenet.us with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.91) (envelope-from ) id 1h7oZx-00Bg8z-6r; Sat, 23 Mar 2019 17:53:26 -0400 Subject: Re: Fix XML handling with DOCTYPE To: Tom Lane References: <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> Cc: Ryan Lambert , pgsql-hackers@postgresql.org From: Chapman Flack X-Enigmail-Draft-Status: N1110 Message-ID: <5C96AAD4.1090006@anastigmatix.net> Date: Sat, 23 Mar 2019 17:53:24 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.0 MIME-Version: 1.0 In-Reply-To: <12135.1553374744@sss.pgh.pa.us> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-OutGoing-Spam-Status: No, score=-95.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bay.acenet.us X-AntiAbuse: Original Domain - postgresql.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - anastigmatix.net X-Get-Message-Sender-Via: bay.acenet.us: authenticated_id: chap@anastigmatix.net X-Authenticated-Sender: bay.acenet.us: chap@anastigmatix.net X-Source: X-Source-Args: X-Source-Dir: X-From-Rewrite: unmodified, already matched List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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