Skip to content
Advertisement

Fixing set-returning functions are not allowed in UPDATE

After upgrading to Postgres 12 statement

throws error

set-returning functions are not allowed in UPDATE

How to fix this ? In Postgres 9.1 it worked. I read similar answers here but they recomment to totally overwrite statement. 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

Update

I tried according to answer

But got error

Advertisement

Answer

Simply replace

with

In your case, you have to use an extra pair of parentheses, because the array_value is an expression:

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement