pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrus <kobruleht2@hot.ee>
To: Pavel Stehule <pavel.stehule@gmail.com>
Cc: pgsql-general <pgsql-general@postgresql.org>
Subject: Re: How to parse XML in Postgres newer versions also
Date: Sun, 17 Mar 2019 16:19:33 +0200
Message-ID: <B563F16528764890A998C435BF6FC93A@dell2> (raw)
In-Reply-To: <CAFj8pRDDi3bWE_EVPUPHpO8htiHgsrLa4n4998Kb9+HWMM5exA@mail.gmail.com>
References: <DDC50001C3E84A67934B664BA564AF61@dell2>
	<CAFj8pRCZyo7BZwweHR236SnTvLCgf9UjEtKOsVwGeNBtPd3mBw@mail.gmail.com>
	<CAFj8pRDDi3bWE_EVPUPHpO8htiHgsrLa4n4998Kb9+HWMM5exA@mail.gmail.com>

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

Andrus.












view thread (9+ messages)  latest in thread

Message-ID: <B563F16528764890A998C435BF6FC93A@dell2>
Permalink:  ../B563F16528764890A998C435BF6FC93A@dell2/
Also on:    postgresql.org/message-id/B563F16528764890A998C435BF6FC93A@dell2

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: kobruleht2@hot.ee, pavel.stehule@gmail.com
  Subject: Re: How to parse XML in Postgres newer versions also
  In-Reply-To: <B563F16528764890A998C435BF6FC93A@dell2>
  References: <DDC50001C3E84A67934B664BA564AF61@dell2> <CAFj8pRCZyo7BZwweHR236SnTvLCgf9UjEtKOsVwGeNBtPd3mBw@mail.gmail.com> <CAFj8pRDDi3bWE_EVPUPHpO8htiHgsrLa4n4998Kb9+HWMM5exA@mail.gmail.com> <B563F16528764890A998C435BF6FC93A@dell2>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox