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

From: "Andrus" <kobruleht2(at)hot(dot)ee>
To: "Laurenz Albe" <laurenz(dot)albe(at)cybertec(dot)at>, "pgsql-general" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Fixing set-returning functions are not allowed in UPDATE after upgrade to Postgres 12
Date: 2020-04-03 06:37:39
Message-ID: EE75EFEEE1444A3883206B762AB13B10@dell2
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David G. Johnston 2020-04-03 07:17:55 Re: Fixing set-returning functions are not allowed in UPDATE after upgrade to Postgres 12
Previous Message postgann2020 s 2020-04-03 05:15:03 Re: Help to find-the-maximum-length-of-field-in-a-particular-column-in-all the tables