Re: possible bug in xpath function

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: possible bug in xpath function
Дата
Msg-id 877002.1647013995@sss.pgh.pa.us
обсуждение исходный текст
Ответы Re: possible bug in xpath function  (Andrey Kapliev <a.kapliev@gmail.com>)
Список pgsql-bugs
Andrey Kapliev <a.kapliev@gmail.com> writes:
> It looks like XPATH name() function called from xpath() PostgreSQL
> function behave differently than when called from XMLTABLE()
> PATH.

Your examples are by no means equivalent: in particular the XMLTABLE
example is using an absolute path //* while the xpath example
is implicitly using a relative path.

> This
> behavior is different from that of 9.6 version where xpath correctly
> returns names of the nodes.

I think this was an intentional change in v11.  The 11.0 release
notes mention

  * 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.

            regards, tom lane



В списке pgsql-bugs по дате отправления:

Предыдущее
От: Masahiko Sawada
Дата:
Сообщение: Re: BUG #17385: "RESET transaction_isolation" inside serializable transaction causes Assert at the transaction end
Следующее
От: Andrey Kapliev
Дата:
Сообщение: Re: possible bug in xpath function