Fixing set-returning functions are not allowed in UPDATE after upgrade to Postgres 12 - Mailing list pgsql-general

From Andrus
Subject Fixing set-returning functions are not allowed in UPDATE after upgrade to Postgres 12
Date
Msg-id B45C75638FC04DD1A56F10240E037DC4@dell2
Whole thread Raw
Responses Re: Fixing set-returning functions are not allowed in UPDATE afterupgrade to Postgres 12
List pgsql-general
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. 




pgsql-general by date:

Previous
From: Laurenz Albe
Date:
Subject: Re: using a common key value on both sides of a union ?
Next
From: Laurenz Albe
Date:
Subject: Re: Fixing set-returning functions are not allowed in UPDATE afterupgrade to Postgres 12