Re: jsonb_set() strictness considered harmful to data

From: Maciek Sakrejda <m(dot)sakrejda(at)gmail(dot)com>
To: Stuart McGraw <smcg4191(at)mtneva(dot)com>
Cc: "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: jsonb_set() strictness considered harmful to data
Date: 2019-10-24 01:00:19
Message-ID: CAOtHd0DK=9bc6uBqt+hmfjkWj-EoUivf6rDZpnK8b2xswnrfcQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

On Wed, Oct 23, 2019 at 12:01 PM Stuart McGraw <smcg4191(at)mtneva(dot)com> wrote:
> Why the inconsistency between the array
> type and json type? Are there any cases other than json where the entire
> compound value is set to NULL as a result of one of its components being
> NULL?

That's a great point. It does look like hstore's delete / minus
operator behaves like that, though:

=# select 'a=>1,b=>2'::hstore - null;
?column?
----------

(1 row)

In response to

Browse pgsql-general by date

  From Date Subject
Next Message rob stone 2019-10-24 01:52:36 Re: jsonb_set() strictness considered harmful to data
Previous Message Rob Sargent 2019-10-23 22:02:02 Re: Composite type storage overhead

Browse pgsql-hackers by date

  From Date Subject
Next Message rob stone 2019-10-24 01:52:36 Re: jsonb_set() strictness considered harmful to data
Previous Message Bruce Momjian 2019-10-23 22:08:21 Re: BUG #16045: vacuum_db crash and illegal memory alloc after pg_upgrade from PG11 to PG12