Re: jsonb_set() strictness considered harmful to data

Поиск
Список
Период
Сортировка
От Christoph Moench-Tegeder
Тема Re: jsonb_set() strictness considered harmful to data
Дата
Msg-id 20191018225752.GC56427@elch.exwg.net
обсуждение исходный текст
Ответ на Re: jsonb_set() strictness considered harmful to data  (Ariadne Conill <ariadne@dereferenced.org>)
Ответы Re: jsonb_set() strictness considered harmful to data  (Ariadne Conill <ariadne@dereferenced.org>)
Список pgsql-general
## Ariadne Conill (ariadne@dereferenced.org):

> Why don't we fix the database engine to not eat data when the
> jsonb_set() operation fails?

It didn't fail, it worked like SQL (you've been doing SQL for too
long when you get used to the NULL propagation, but that's still
what SQL does - check "+" for example).
And changing a function will cause fun for everyone who relies on
the current behaviour - so at least it shouldn't be done on a whim
(some might argue that a whim was what got us into this situation
in the first place).

Continuing along that thought, I'd even argue that your are
writing code which relies on properties of the data which you never
guaranteed. There is a use case for data types and constraints.
Not that I'm arguing for maximum surprise in programming, but
I'm a little puzzled when people eschew thew built-in tools and
start implmenting them again side-to-side with what's already
there.

Regards,
Christoph

-- 
Spare Space



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

Предыдущее
От: Ariadne Conill
Дата:
Сообщение: Re: jsonb_set() strictness considered harmful to data
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: jsonb_set() strictness considered harmful to data