Re: jsonb_set() strictness considered harmful to data

From: "Ariadne Conill" <ariadne(at)dereferenced(dot)org>
To: "Tomas Vondra" <tomas(dot)vondra(at)2ndquadrant(dot)com>, "Andrew Dunstan" <andrew(dot)dunstan(at)2ndquadrant(dot)com>
Cc: "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com>, "Michael Paquier" <michael(at)paquier(dot)xyz>, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, "Floris Van Nee" <florisvannee(at)optiver(dot)com>, "Mark Felder" <feld(at)freebsd(dot)org>, "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>, "PostgreSQL Hackers" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: jsonb_set() strictness considered harmful to data
Date: 2020-01-17 23:28:09
Message-ID: 186aabc08298ee04736a1c994f64f218@dereferenced.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Hello,

January 17, 2020 5:21 PM, "Tomas Vondra" <tomas(dot)vondra(at)2ndquadrant(dot)com> wrote:

> On Wed, Jan 08, 2020 at 05:24:05PM +1030, Andrew Dunstan wrote:
>
>> On Wed, Jan 8, 2020 at 7:08 AM Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> wrote:
>>> Hi
>>>
>>> po 6. 1. 2020 v 22:34 odesílatel Andrew Dunstan <andrew(dot)dunstan(at)2ndquadrant(dot)com> napsal:
>>
>> Updated version including docco and better error message.
>>
>> cheers
>>
>> andrew
>>> I think so my objections are solved. I have small objection
>>>
>>> + errdetail("exception raised due to \"null_value_treatment := 'raise_exception'\""),
>>> + errhint("to avoid, either change the null_value_treatment argument or ensure that an SQL NULL is
>>> not used")));
>>>
>>> "null_value_treatment := 'raise_exception'\""
>>>
>>> it use proprietary PostgreSQL syntax for named parameters. Better to use ANSI/SQL syntax
>>>
>>> "null_value_treatment => 'raise_exception'\""
>>>
>>> It is fixed in attached patch
>>>
>>> source compilation without warnings,
>>> compilation docs without warnings
>>> check-world passed without any problems
>>>
>>> I'll mark this patch as ready for commiter
>>>
>>> Thank you for your work
>>
>> Thanks for the review. I propose to commit this shortly.
>
> Now that this was committed, I've updated the patch status accordingly.

Thank you very much for coming together and finding a solution to this bug!

Ariadne

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Rob Sargent 2020-01-17 23:30:59 Re: jsonb_set() strictness considered harmful to data
Previous Message Tomas Vondra 2020-01-17 23:21:10 Re: jsonb_set() strictness considered harmful to data

Browse pgsql-hackers by date

  From Date Subject
Next Message Rob Sargent 2020-01-17 23:30:59 Re: jsonb_set() strictness considered harmful to data
Previous Message Tomas Vondra 2020-01-17 23:21:10 Re: jsonb_set() strictness considered harmful to data