Re: How to parse XML in Postgres newer versions also - Mailing list pgsql-general

From Pavel Stehule
Subject Re: How to parse XML in Postgres newer versions also
Date
Msg-id CAFj8pRC7U7u-eYv_bGT9w8T65HeriTaHFPY=N1jGfBomBsJ1rA@mail.gmail.com
Whole thread Raw
In response to How to parse XML in Postgres newer versions also  ("Andrus" <kobruleht2@hot.ee>)
List pgsql-general


ne 17. 3. 2019 v 15:19 odesílatel Andrus <kobruleht2@hot.ee> napsal:
Hi!

>You can use XMLTABLE function
>select xmltable.*
>  from t,
>          lateral
> xmltable(xmlnamespaces('urn:iso:std:iso:20022:tech:xsd:camt.053.001.02' as
> ns),
>
> '/ns:Document/ns:BkToCstmrStmt/ns:Stmt/ns:Ntry/.' passing t.x
>                                 columns tasusumma numeric path 'ns:Amt')

In 9.1.5 this throws error

ERROR: syntax error at or near "("
LINE 20: lateral xmltable(xmlnamespaces(
                                                                    ^
SQL state: 42601
Character: 582

sure, XMLTABLE is supported from PostgreSQL 10.

Pavel


Andrus.








pgsql-general by date:

Previous
From: "Warner, Gary, Jr"
Date:
Subject: Re: Facing issue in using special characters
Next
From: Pavel Stehule
Date:
Subject: Re: How to parse XML in Postgres newer versions also