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 1gl5JK-00044Y-UJ for pgsql-hackers@arkaria.postgresql.org; Sun, 20 Jan 2019 05:06:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gl5JJ-0004Sm-HT for pgsql-hackers@arkaria.postgresql.org; Sun, 20 Jan 2019 05:06:17 +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 1gl5JJ-0004Sf-AM for pgsql-hackers@lists.postgresql.org; Sun, 20 Jan 2019 05:06:17 +0000 Received: from bay.acenet.us ([173.230.252.50]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gl5JC-0006A8-My for pgsql-hackers@lists.postgresql.org; Sun, 20 Jan 2019 05:06:16 +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:References:To:Subject:Sender: Reply-To:Cc: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=MWoiVq6p4BbW2QXniHIivqZ3sfHUac6P3KLfzOJ0erA=; b=q/ZOSJYXLrDopcKTleFzRA2b54 amjHp93r6atQ65d6hiQJ/0CGt2QqvJVT94q/aPFGTxlmnoy6Dh0fNixaV1jM6rielxU5pxmGAlpuD QcOkviOrk2RBwM6o3/BoIy1eB5AsI8lHQ4GgydAJkrsjJOy4a87QPscx39XUtKdavNtZWr1dIkoK8 IpxyMZwJ2zb41bYfNVb5HCdHYhRTL086lk+6sz2z8jzKT0LUBDXg/VJY2CWj56sk624/wE5kodWSB UemkLITvX/heIxb1efdrFSaD3ASXxNCgpAdmaPHUOjrJXOSO3n7nDfYHXYduxmd9YzbbYyciIDJme QANdtEEQ==; Received: from [192.182.57.242] (port=50091) by bay.acenet.us with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.91) (envelope-from ) id 1gl5J9-00EQoF-1c for pgsql-hackers@lists.postgresql.org; Sun, 20 Jan 2019 00:06:08 -0500 Subject: Re: PostgreSQL vs SQL/XML Standards To: pgsql-hackers@lists.postgresql.org References: <45C74339-3531-46BD-A595-37183C6730A1@winand.at> <5C283168.8060001@anastigmatix.net> <5C291741.9060506@anastigmatix.net> <5C297BB7.9070509@anastigmatix.net> <5C3A7A90.3070207@anastigmatix.net> <5C43FAEB.2070000@anastigmatix.net> From: Chapman Flack X-Enigmail-Draft-Status: N1110 Message-ID: <5C4401BE.4080606@anastigmatix.net> Date: Sun, 20 Jan 2019 00:06:06 -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: Content-Type: text/plain; charset=utf-8 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 01/19/19 23:49, Pavel Stehule wrote: > If I remember, described functionality was implemented in early patches, > but was removed to simplify code. To now, there was not a request to do it. > > Unfortunately, the documentation was not fixed. I'll do that, as I'm working in there anyway. :) > column expressions are evaluated once per row, but XPath expression is > compiled per row too, if I remember well. I looked for evidence of that in the code, but did not find it; the compilation appears to happen in XmlTableSetColumnFilter, which is called from tfuncInitialize. I can't guarantee I didn't miss something, though. > We designed it more tolerant as > we expected possibility to store XPath expression in one column and data in > second column. Perhaps if I could see an example showing the functionality... The nearest I could find in the regression tests was the test with COLUMNS a int PATH '' || lower(_path) || 'c' but, again, I think that test only demonstrates how LATERAL works, not any behavior specific to xmltable. Regards, -Chap