Re: jsonb concatenate operator's semantics seem questionable

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: jsonb concatenate operator's semantics seem questionable
Дата
Msg-id 14013.1432331675@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: jsonb concatenate operator's semantics seem questionable  (Jim Nasby <Jim.Nasby@BlueTreble.com>)
Ответы Re: jsonb concatenate operator's semantics seem questionable  (Jim Nasby <Jim.Nasby@BlueTreble.com>)
Re: jsonb concatenate operator's semantics seem questionable  (Peter Geoghegan <pg@heroku.com>)
Список pgsql-hackers
Jim Nasby <Jim.Nasby@BlueTreble.com> writes:
> On 5/22/15 2:44 PM, Andrew Dunstan wrote:
>> Still I'd rather not add yet another parameter to the function, and I
>> certainly don't want to make throwing an error the only behaviour.

> If instead of a create_missing boolean it accepted an enum we could 
> handle both (since they're related). But I'd also like to avoid Yet More 
> Knobs if possible.

> I think there's essentially two scenarios for JSON usage; one where you 
> want to be pretty paranoid about things like keys aren't missing, you're 
> not trying to access a path that doesn't exist, etc. The other mode 
> (what we have today) is when you really don't care much about that stuff 
> and want the database to JustStoreIt. I don't know how many people would 
> want the stricter mode, but it certainly seems painful to try and 
> enforce that stuff today if you care about it.

ISTM that the use case for JSON is pretty much JustStoreIt.  If you had
strict structural expectations you'd probably have chosen a more
relational representation in the first place ... or else XML, which at
least has heard of schemas and validation.  So I definitely agree that
we need the no-error case, and am not that excited about having an
error-throwing variant.
        regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Change pg_cancel_*() to ignore current backend
Следующее
От: Jim Nasby
Дата:
Сообщение: Re: Change pg_cancel_*() to ignore current backend