Re: JSON array is not updated if updating with empty array

Поиск
Список
Период
Сортировка
От Jeff Janes
Тема Re: JSON array is not updated if updating with empty array
Дата
Msg-id CAMkU=1wcY70ccxajUjSenADeTi8gwMMPUTjZhf0z4iwzgV9UHA@mail.gmail.com
обсуждение исходный текст
Ответ на JSON array is not updated if updating with empty array  (Radics Geza <radicsge@gmail.com>)
Список pgsql-bugs
On Fri, Mar 6, 2020 at 1:52 PM Radics Geza <radicsge@gmail.com> wrote:
Json column is not updated if the update is an empty array '[]'.

UPDATE table SET "jsonbcol" = '[{"a":1}]';
UPDATE table SET "jsonbcol = '[]' RETURNING "jsonbcol";

jsonbcol
------------
 [{"a": 1}]
(1 row)

It worked in postgres 9.6, but not in 11.7 / 12.2

Works for me.  Please show a complete working example, with CREATE TABLE, INSER, and an UPDATE statement with legal table name and with balanced quotes.

 Cheers,

Jeff

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Radics Geza
Дата:
Сообщение: Re: JSON array is not updated if updating with empty array
Следующее
От: Christophe Pettus
Дата:
Сообщение: Re: JSON array is not updated if updating with empty array