pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrus <kobruleht2@hot.ee>
To: pgsql-general <pgsql-general@postgresql.org>
Subject: Fixing set-returning functions are not allowed in UPDATE after upgrade to Postgres 12
Date: Thu, 2 Apr 2020 17:48:59 +0300
Message-ID: <B45C75638FC04DD1A56F10240E037DC4@dell2> (raw)

Hi!

After upgrading to Postgres 12   statement

update temprid set
    ContactFirstName =unnest(xpath(
         '/E-Document/Document/DocumentParties/BuyerParty/ContactData/ContactFirstName/text()',x))::text,
    yhik =unnest(xpath(
         '/E-Document/Document/DocumentItem/ItemEntry/BaseUnit/text()',x))::text
         from t

throws error

set-returning functions are not allowed in UPDATE

How to fix this ?


Maybe there is simply change which makes this statement work ?
Result should by any value of xpath expression in case if xpath returns 
multiple values
In Postgres 9.1 it worked.

Andrus. 






view thread (4+ messages)  latest in thread

Message-ID: <B45C75638FC04DD1A56F10240E037DC4@dell2>
Permalink:  ../B45C75638FC04DD1A56F10240E037DC4@dell2/
Also on:    postgresql.org/message-id/B45C75638FC04DD1A56F10240E037DC4@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
  Subject: Re: Fixing set-returning functions are not allowed in UPDATE after upgrade to Postgres 12
  In-Reply-To: <B45C75638FC04DD1A56F10240E037DC4@dell2>
  References: <B45C75638FC04DD1A56F10240E037DC4@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