Re: jsonb concatenate operator's semantics seem questionable

From: Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>, Robert Haas <robertmhaas(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Josh Berkus <josh(at)agliodbs(dot)com>, Peter Geoghegan <pg(at)heroku(dot)com>, Petr Jelinek <petr(at)2ndquadrant(dot)com>, Marko Tiikkaja <marko(at)joh(dot)to>, Ryan Pedela <rpedela(at)datalanche(dot)com>, Dmitry Dolgov <9erthalion6(at)gmail(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, Ilya Ashchepkov <koctep(at)gmail(dot)com>
Subject: Re: jsonb concatenate operator's semantics seem questionable
Date: 2015-05-22 18:38:47
Message-ID: 555F77B7.3070604@BlueTreble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 5/21/15 4:25 PM, Andrew Dunstan wrote:
> Here is a patch that renames jsonb_replace to jsonb_set with a boolean
> create_missing flag that defaults to false (should we default it to
> true?). With the flag set it's more or less upsert for jsonb. Without,
> it's just update.

I think upsert is probably the more expected behavior.

Though, I'm also wondering if we should allow for throwing an error if
path doesn't already exist (it looks like if create_missing is false it
silently does nothing right now?)
--
Jim Nasby, Data Architect, Blue Treble Consulting
Data in Trouble? Get it in Treble! http://BlueTreble.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2015-05-22 18:45:15 Re: Change pg_cancel_*() to ignore current backend
Previous Message Fabrízio de Royes Mello 2015-05-22 18:34:50 Re: Change pg_cancel_*() to ignore current backend