From: | Felipe de Jesús Molina Bravo <fjmolinabravo(at)gmail(dot)com> |
---|---|
To: | pgsql <pgsql-es-ayuda(at)postgresql(dot)org> |
Subject: | xpath comportamiento diferente entre postgres 11.4 y 10.3 |
Date: | 2019-07-03 15:24:23 |
Message-ID: | CALrs2KNOv8R-EVBNkFtGOAJ8JOo36xoANh0-+K44c8+mW9ohfg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-es-ayuda |
Que tal lista buen día!
En postgresql 10.3 la misma consulta obtiene:
select xpath('@idc', '<p idc="4776" rc="Cuadro" idrg="5"/>' ) ;
xpath
--------
{4776}
(1 fila)
En postgresql 11.4 tengo el siguiente resultado:
select xpath('@idc', '<p idc="4776" rc="Cuadro" idrg="5"/>'::xml ) ;
xpath
-------
{}
(1 fila)
Ahora si le pongo las diagonales a la expresión en xpath:
select xpath('//@idc', '<p idc="4776" rc="Cuadro" idrg="5"/>'::xml ) ;
xpath
--------
{4776}
(1 fila)
En las notas del release de postgresql 11 dice:
-
*Correctly handle relative path expressions in xmltable(), xpath(), and
other XML-handling functions (Markus Winand)*
*Per the SQL standard, relative paths start from the document node of the
XML input document, not the root node as these functions previously did.*
A pesar de esta nota no veo porque se comporte diferente...o quizas no
entiendo bien la nota...que opinan ustedes?
Saludos y gracias de antemano!
From | Date | Subject | |
---|---|---|---|
Next Message | Guillermo E. Villanueva | 2019-07-05 22:08:19 | problema al intentar recuperar PITR |
Previous Message | Alvaro Herrera | 2019-07-01 21:35:20 | Re: Fallo en función |