Updating single/multiple fields of JSON document

Started by bln prasadover 11 years ago3 messagesgeneral
Jump to latest
#1bln prasad
prasad.bln@gmail.com

Hi,
Is there any way to update single/multiple fields of JSON document of a
column?

Thanks,
BLN

#2Bruce Momjian
bruce@momjian.us
In reply to: bln prasad (#1)
Re: Updating single/multiple fields of JSON document

On Mon, Dec 8, 2014 at 04:56:00PM +0530, bln prasad wrote:

Hi,
� �Is there any way to update single/multiple fields of JSON document of a
column?

No, not yet. We are thinking of options but don't have any work in
progress.

--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ Everyone has their own god. +

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#3Roxanne Reid-Bennett
rox@tara-lu.com
In reply to: Bruce Momjian (#2)
Re: Updating single/multiple fields of JSON document

On 12/9/2014 3:38 PM, Bruce Momjian wrote:

On Mon, Dec 8, 2014 at 04:56:00PM +0530, bln prasad wrote:

Hi,
Is there any way to update single/multiple fields of JSON document of a
column?

No, not yet. We are thinking of options but don't have any work in
progress.

Given a pretty distinct well understood structure, we have used
regexp_replace against JSON stored as text.
Depending upon your case, "in the mean time"... you may be able to cast,
update, then cast back.

Roxanne

--
[At other schools] I think the most common fault in general is to teach students how to pass exams instead of teaching them the science.
Donald Knuth

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general