RE: BUG #15908: Xpath operations fail
От | Rick Vincent |
---|---|
Тема | RE: BUG #15908: Xpath operations fail |
Дата | |
Msg-id | MN2PR04MB5806F536B63C3A9A2CA5A1BCC1C80@MN2PR04MB5806.namprd04.prod.outlook.com обсуждение исходный текст |
Ответ на | Re: BUG #15908: Xpath operations fail (Daniel Gustafsson <daniel@yesql.se>) |
Список | pgsql-bugs |
Hi Daniel, Thanks for your reply. I believe all of the major database vendors support it as we implement them all (Oracle, DB2, SQLServer)...orat least their operators >,>=, etc work with XMLExists and do text compares and don't convert any text todecimal. Do you have an answer why XMLExists always seems to be returning true, ie. the last query I sent? T24=# SELECT xpath('/row/c1', xmlrecord) as c1, xpath('/row/c2', t.xmlrecord) as c2, xpath('/row/c2[@m="2"]/text() = ''A''',t.xmlrecord)VAL, xmlexists('/row/c2[@m="2"]/text() = ''A''' PASSING t.xmlrecord) xmlex FROM test t; c1 | c2 | val | xmlex --------------------+--------------------------------------+---------+------- {<c1>Manual</c1>} | {<c2>1</c2>,"<c2 m=\"2\">2</c2>"} | {false} | t {<c1>Apropos</c1>} | {<c2>1</c2>,"<c2 m=\"2\">2</c2>"} | {false} | t {<c1>Bprop</c1>} | {<c2>1</c2>,"<c2 m=\"2\">3</c2>"} | {false} | t {<c1>Bprop</c1>} | {<c2>1</c2>,"<c2 m=\"2\">4</c2>"} | {false} | t {<c1>Dprop</c1>} | {<c2>1</c2>,"<c2 m=\"2\">A</c2>"} | {true} | t {<c1>Eprop</c1>} | {<c2>1</c2>,"<c2 m=\"2\">D</c2>"} | {false} | t {<c1>Fprop</c1>} | {<c2>1</c2>,"<c2 m=\"2\">test</c2>"} | {false} | t (7 rows) Big thanks, Rick -----Original Message----- From: Daniel Gustafsson <daniel@yesql.se> Sent: Thursday, July 18, 2019 3:06 PM To: Rick Vincent <rvincent@temenos.com> Cc: Herve Aubert <haubert@temenos.com>; PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org> Subject: Re: BUG #15908: Xpath operations fail > On 18 Jul 2019, at 11:48, Rick Vincent <rvincent@temenos.com> wrote: > Thanks. It explains why ends-with doesn't work either. I don't suppose XPath 2.0 version is supported or will be supported? I haven’t heard of anyone working on that, and it seems unlikely to happen within the near future as few, if any, librariessupport XPath 2.0 (or later). cheers ./daniel The information in this e-mail and any attachments is confidential and may be legally privileged. It is intended solely forthe addressee or addressees. Any use or disclosure of the contents of this e-mail/attachments by a not intended recipientis unauthorized and may be unlawful. If you have received this e-mail in error please notify the sender. Pleasenote that any views or opinions presented in this e-mail are solely those of the author and do not necessarily representthose of TEMENOS. We recommend that you check this e-mail and any attachments against viruses. TEMENOS accepts noliability for any damage caused by any malicious code or virus transmitted by this e-mail.
В списке pgsql-bugs по дате отправления: