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!