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

From Andrus
Subject Re: Fixing set-returning functions are not allowed in UPDATE after upgrade to Postgres 12
Date
Msg-id EE75EFEEE1444A3883206B762AB13B10@dell2
Whole thread Raw
In response to Re: Fixing set-returning functions are not allowed in UPDATE afterupgrade to Postgres 12  (Laurenz Albe <laurenz.albe@cybertec.at>)
Responses Re: Fixing set-returning functions are not allowed in UPDATE afterupgrade to Postgres 12
List pgsql-general
Hi!

>Simply replace
>   SET col = unnest(array_value)
>with
>
>   SET col = array_value[1]

I tried

update temprid set
    ContactFirstName =xpath(
         '/E-Document/Document/DocumentParties/BuyerParty/ContactData/ContactFirstName/text()',x)[1]::text

But got error

    ERROR:  syntax error at or near "["
    LINE 3: .../BuyerParty/ContactData/ContactFirstName/text()',x)[1]::text

How to fix ?

Posted also in 

https://stackoverflow.com/questions/60993975/fixing-set-returning-functions-are-not-allowed-in-update

Andrus.



pgsql-general by date:

Previous
From: postgann2020 s
Date:
Subject: Re: Could someone please help us share the procedure to troubleshootthe locks on proc issues.
Next
From: "David G. Johnston"
Date:
Subject: Re: Fixing set-returning functions are not allowed in UPDATE afterupgrade to Postgres 12