Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b3SC4-0001Mb-9F for pgsql-bugs@arkaria.postgresql.org; Thu, 19 May 2016 17:57:08 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1b3SC2-0004dE-KF for pgsql-bugs@arkaria.postgresql.org; Thu, 19 May 2016 17:57:06 +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_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1b3SBO-0003wO-Rf for pgsql-bugs@postgresql.org; Thu, 19 May 2016 17:56:26 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1b3SBK-00047q-1O for pgsql-bugs@postgresql.org; Thu, 19 May 2016 17:56:25 +0000 Received: from pro.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id u4JHuIRq013381; Thu, 19 May 2016 13:56:18 -0400 From: Tom Lane To: onic@live.fr cc: pgsql-bugs@postgresql.org Subject: Re: BUG #14151: Xml special symbols are not unescaped when gettting value of Xml via xpath In-reply-to: <20160519150037.12503.16@wrigleys.postgresql.org> References: <20160519150037.12503.16@wrigleys.postgresql.org> Comments: In-reply-to onic@live.fr message dated "Thu, 19 May 2016 15:00:37 -0000" Date: Thu, 19 May 2016 13:56:18 -0400 Message-ID: <32376.1463680578@sss.pgh.pa.us> X-Pg-Spam-Score: -3.3 (---) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org onic@live.fr writes: > SELECT unnest(xpath('/name/text()', xmlelement(name name, 'AT&T', null ))) > This gives me 'AT&T' and AFAICS, that behavior is correct. xpath returns a value of type xml (well, really xml[]) and 'AT&T' is not a legal value of that type; only 'AT&T' is. > I have NO WAY inside pgsql to get 'At&t' value I agree that there ought to be an "unescape" function that would convert this back to 'AT&T', but the lack of one seems like a missing feature not a bug. I'd wonder for example what an unescape function ought to do with other markup such as ''. The last concrete discussion we had on this seems to have been this thread: http://www.postgresql.org/message-id/flat/C71079E6-12D8-4048-B8C5-18368936FD5D@phlo.org which petered out for lack of anyone finding the time to investigate the relevant standards. regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs