add batch remove batch split batch comment selection show hidden batches hide batch highlight batch
db<>fiddle
donate feedback about
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
Help with an interesting Postgres question: Why isn't an Index Only Scan used on a partition accessed via the parent table?.
drop table if exists catalog;
create table catalog(sku text, properties jsonb);
insert into catalog values
('nu3_1',
'{
"name": "silly_hodgkin",
"type": "food",
"attributes": [
"is_gluten_free",
"is_lactose_free",
"is_new"
]
}');

DROP TABLE
CREATE TABLE
INSERT 0 1
update catalog
set properties =
jsonb_set(properties, '{attributes}', (properties->'attributes') - 'is_new')
returning jsonb_pretty(properties)
jsonb_pretty
{
    "name": "silly_hodgkin",
    "type": "food",
    "attributes": [
        "is_gluten_free",
        "is_lactose_free"
    ]
}
UPDATE 1