JSON array is not updated if updating with empty array - Mailing list pgsql-bugs

From Radics Geza
Subject JSON array is not updated if updating with empty array
Date
Msg-id CAJFbfO84H34Fqyxgk2S8erN+FarooDeKS+vMM1dvvs9gPkq5oA@mail.gmail.com
Whole thread Raw
Responses Re: JSON array is not updated if updating with empty array
Re: JSON array is not updated if updating with empty array
List pgsql-bugs
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

thanks!

pgsql-bugs by date:

Previous
From: PG Bug reporting form
Date:
Subject: BUG #16287: 'Server doesn't listen' after setting 'timezone' to "America/Detroit US/Michigan"
Next
From: Jeff Janes
Date:
Subject: Re: BUG #16287: 'Server doesn't listen' after setting 'timezone' to"America/Detroit US/Michigan"