Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id BAE731337B43 for ; Tue, 1 Feb 2011 11:20:51 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 64432-02 for ; Tue, 1 Feb 2011 15:20:51 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from wwwmaster.postgresql.org (wwwmaster.postgresql.org [217.196.146.204]) by mail.postgresql.org (Postfix) with ESMTP id 1F9621337999 for ; Tue, 1 Feb 2011 11:20:50 -0400 (AST) Received: from wwwmaster.postgresql.org (wwwmaster.postgresql.org [217.196.146.204]) by wwwmaster.postgresql.org (8.14.3/8.14.3) with ESMTP id p11FKpcM022296 for ; Tue, 1 Feb 2011 15:20:51 GMT (envelope-from www@wwwmaster.postgresql.org) Received: (from www@localhost) by wwwmaster.postgresql.org (8.14.3/8.14.3/Submit) id p11FKpLt022295; Tue, 1 Feb 2011 15:20:51 GMT (envelope-from www) Date: Tue, 1 Feb 2011 15:20:51 GMT Message-Id: <201102011520.p11FKpLt022295@wwwmaster.postgresql.org> To: pgsql-bugs@postgresql.org Subject: BUG #5859: XML result in line and column From: "Alexandre" Content-Type: text/plain; charset=utf-8 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 201102/5 X-Sequence-Number: 29277 The following bug has been logged online: Bug reference: 5859 Logged by: Alexandre Email address: ultrago@gmail.com PostgreSQL version: 8.4.7 Operating system: Windows 7 Description: XML result in line and column Details: The name of the xml tag is not being updated, becoming the first name registry for all. Here is example: Create table AUDITORIA_ANTERIOR ( SEQUENCIA Serial NOT NULL, SEQUENCIA_AUDITORIA Integer NOT NULL, REGISTRO Text NOT NULL, primary key (SEQUENCIA,SEQUENCIA_AUDITORIA) ); insert into auditoria_anterior (sequencia_auditoria, registro) values (1, ' 123456789011FJOAO DA SILVA ') SELECT * FROM xpath_table('sequencia', 'registro', 'auditoria_anterior', 'name(/ROOT/CLIENTES/*)|/ROOT/CLIENTES/*', 'sequencia = 1') AS t(sequencia integer, coluna text, valor text) --Incorrect result----------------------------------- sequencia coluna valor integer text text -------------------------------------------------- 1 CGC_CPF_CLIENTE 12345678901 1 CGC_CPF_CLIENTE 1 1 CGC_CPF_CLIENTE F 1 CGC_CPF_CLIENTE JOAO DA SILVA --Result that would be right to be presented---------- sequencia coluna valor integer text text -------------------------------------------------- 1 CGC_CPF_CLIENTE 12345678901 1 TIPO 1 1 PESSOA F 1 NOME JOAO DA SILVA