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 1grEdy-0002m7-Ag for pgsql-hackers@arkaria.postgresql.org; Wed, 06 Feb 2019 04:17:02 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1grEdw-0000uL-Hj for pgsql-hackers@arkaria.postgresql.org; Wed, 06 Feb 2019 04:17:00 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1grEdv-0000uE-RS for pgsql-hackers@lists.postgresql.org; Wed, 06 Feb 2019 04:17:00 +0000 Received: from bay.acenet.us ([173.230.252.50]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1grEds-0007oi-M6 for pgsql-hackers@lists.postgresql.org; Wed, 06 Feb 2019 04:16:58 +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=Jm380047erDADVQ6JdF5DJxPXTkzHe+tXEe8+mAb6MM=; b=e3GjwJthbneHqkt5maSb1MNcxQ Om8qvD383Dulnzwg/Zs/dd2RAsQELrZ4AZBlWbUf9C0516VN6vactYTvNJpRHgQVlAgT5zQpI/snu fh++yJ3sDsFM5V8uGyRezFaVrddyFtjvYrSxjJJ9Is33YD9OED8RjjHR/1I5euN1Mx4ipQCpsRhLA YBUcFcQ81w91aPj/3KFWo4/PyjDCb3lJTXHNxdzsMe6aX+enF4SmsIt+gCM5g5WgA/1MgDVzRmCjT pKBTJH6Leua2QxN/BFRdN7UfIBobgQnemrO7oK7LGS+UZl5zhrvAPR9PdLmCXp3FuVMGK0uuCNl6J ObJFJdVQ==; Received: from [50.127.84.24] (port=41325) by bay.acenet.us with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.91) (envelope-from ) id 1grEdm-000jhq-6g; Tue, 05 Feb 2019 23:16:51 -0500 Subject: Re: PostgreSQL vs SQL/XML Standards To: Michael Paquier , Pavel Stehule References: <5C449C71.7060903@anastigmatix.net> <5C44B332.6070609@anastigmatix.net> <5C44F26D.5010703@anastigmatix.net> <5C4A94A5.8010402@anastigmatix.net> <5C4BABDC.4010600@anastigmatix.net> <20190202012008.GF11299@paquier.xyz> Cc: PostgreSQL Hackers , Markus Winand , Alvaro Herrera , Tom Lane From: Chapman Flack X-Enigmail-Draft-Status: N1110 Message-ID: <5C5A5FB1.5010408@anastigmatix.net> Date: Tue, 5 Feb 2019 23:16:49 -0500 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: <20190202012008.GF11299@paquier.xyz> 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 - lists.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 02/01/19 20:20, Michael Paquier wrote: > On Thu, Jan 31, 2019 at 04:26:31PM +0100, Pavel Stehule wrote: >> I'll mark this patch as ready for commiters. > > For now I have moved the patch to the next CF, with the same status. I wonder whether, given the move to next CF, it makes sense to change the title of the CF entry from "XMLTABLE" to, more generically, XML improvements, and get one or two more small changes in: - get XMLPARSE(CONTENT... (and cast-to-xml with XMLOPTION=content) to succeed even for content with DTDs, so that the content subtype really does fully include the document subtype, aligning it with the SQL:2006+ standard. I think this would be a simple patch that I can deliver early this month, and Tom found reports where the current behavior already bites people in pg_restore. Its only effect would be to allow a currently- failing case to succeed (and stop biting people). - get XMLEXISTS and XMLTABLE to allow passing of named parameters. I have less of a sense of how difficult that might be, but I see that the libxml xpath API does allow them. I don't know whether they were left out of the original development just arbitrarily, or whether some effort was made and ran into some problem. The value of supporting the named parameters, especially when the library limits us to XPath 1.0, is that the XPath 1.0 limitation that a value passed as the context item can only be an XML 'document' only applies to the context item, not to named parameters. So if somebody is trying to port an expression ...'foo(.)' PASSING bar... and bar is not in document form, there's a simple rewrite to ...'foo($a) PASSING bar AS a... whereas if we can't do named parameters, frustration ensues. Again, the only effect of such a change would be to permit something that currently isn't possible. I don't think I can promise to work on a patch for the second issue, but they both seem worthwhile, and I'm happy to work on the first. It seems to me these changes and the doc patch to go with them are closely enough related to fit in one CF entry that's still smaller and simpler than many, and that shouldn't be too difficult to review for v12, but I'll defer to more experienced voices. Regards, -Chap