JSONB in-place updates?
Are there any plans to add "in-place at-depth" update operator for JSONB
type, e.g.:
UPDATE test SET attrs->'anwser' = 42 where attrs->'answer' = 41
On 04/14/2014 09:27 AM, kelas wrote:
Are there any plans to add "in-place at-depth" update operator for JSONB
type, e.g.:UPDATE test SET attrs->'anwser' = 42 where attrs->'answer' = 41
Plans, yes. But not until 9.5, or maybe as an extension.
--
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
Import Notes
Reply to msg id not found: WM14be5ef08ba7b9bafecd47b0f3dadcd23085c04b687ff02203113b0af10fe63ea70a58eb4dc3c77eb90eff8a9dc6efb0@asav-1.01.com
On Tue, Apr 15, 2014 at 5:16 AM, Josh Berkus <josh@agliodbs.com> wrote:
On 04/14/2014 09:27 AM, kelas wrote:
Are there any plans to add "in-place at-depth" update operator for JSONB
type, e.g.:UPDATE test SET attrs->'anwser' = 42 where attrs->'answer' = 41
Plans, yes. But not until 9.5, or maybe as an extension.
A custom function of the type find_and_modify(jsonb_data, key_name,
new_value) combined with the uniqueness of jsonb keys would be a good
workaround for now.
Regards,
--
Michael
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers