BUG #17472: Jsonb[] operations not working

Started by PG Bug reporting formabout 4 years ago2 messagesbugs
Jump to latest
#1PG Bug reporting form
noreply@postgresql.org

The following bug has been logged on the website:

Bug reference: 17472
Logged by: Akshay Agarwal
Email address: agarwal3akshay@gmail.com
PostgreSQL version: 14.2
Operating system: Windows
Description:

The jsonb[] type of columns are not supporting any kind of deletion
operations.
Since jsonb supports array of json objects, why jsonb[] was created? is
there any difference in the performance of the same?

#2Pavel Stehule
pavel.stehule@gmail.com
In reply to: PG Bug reporting form (#1)
Re: BUG #17472: Jsonb[] operations not working

Hi

pá 29. 4. 2022 v 11:03 odesílatel PG Bug reporting form <
noreply@postgresql.org> napsal:

The following bug has been logged on the website:

Bug reference: 17472
Logged by: Akshay Agarwal
Email address: agarwal3akshay@gmail.com
PostgreSQL version: 14.2
Operating system: Windows
Description:

The jsonb[] type of columns are not supporting any kind of deletion
operations.
Since jsonb supports array of json objects, why jsonb[] was created? is
there any difference in the performance of the same?

This is not a bug. Arrays are supported for almost all types in Postgres.
It is a generic feature. Just json can hold arrays too, and from PostgreSQL
14 Postgres allows to use similar interface.

If jsonb arrays are faster than Postgres arrays? It depends on the task and
environment. The update of a jsonb array can have the same speed as an
update of a generic array in SQL, but generic arrays have special support
in PL/pgSQL, and there can be significant differences in performance.

Regards

Pavel