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

Поиск
Список
Период
Сортировка
От Andrus
Тема Fixing set-returning functions are not allowed in UPDATE after upgrade to Postgres 12
Дата
Msg-id B45C75638FC04DD1A56F10240E037DC4@dell2
обсуждение исходный текст
Ответы Re: Fixing set-returning functions are not allowed in UPDATE afterupgrade to Postgres 12
Список 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 по дате отправления:

Предыдущее
От: Laurenz Albe
Дата:
Сообщение: Re: using a common key value on both sides of a union ?
Следующее
От: Laurenz Albe
Дата:
Сообщение: Re: Fixing set-returning functions are not allowed in UPDATE afterupgrade to Postgres 12