From: r piper <asterisktheserver(at)gmail(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject:
Date: 2017-04-12 14:38:43
Message-ID: CAGZGR9yTe-D_KwB_BO1jcNpGtnVgJ2GECUJWZumRbm4Y8jH9kA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

What is the ideal way to update multiple fields within a jsonb column?

For example, if I had the data set

'
{
"field1": true,
"field2": 2,
"field3": "Something",
}
'

How would I update "field2" and "field3". Most questions on StackOverflow
seem to be suggesting either a nested jsonb_set call or using the
concat operator. Neither one of these solutions seems to be as straight
forward as one would expect for updating more than one field in a jsonb
column.

Any help is appreciated,

RPiper

Responses

  • Re: at 2017-04-12 15:02:00 from David G. Johnston

Browse pgsql-novice by date

  From Date Subject
Next Message David G. Johnston 2017-04-12 15:02:00 Re:
Previous Message Dwaraka Srinivasan 2017-04-12 05:31:14 select for share error when inserting data in RDS