Re: [HACKERS] BUG #12070: hstore extension: hstore_to_json_loose produces invalid JSON

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: bouda(at)edookit(dot)com, pgsql-bugs(at)postgresql(dot)org, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [HACKERS] BUG #12070: hstore extension: hstore_to_json_loose produces invalid JSON
Date: 2014-11-30 20:37:35
Message-ID: 547B800F.60309@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers


On 11/30/2014 11:45 AM, Tom Lane wrote:
> Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
>> what do you want to do about this? In the back branches, exposing a
>> function like this would be an API change, wouldn't it? Perhaps there we
>> just need to pick up the 100 lines or so involved from json.c and copy
>> them into hstore_io.c, suitably modified. In the development branch I
>> thing adding the function to the API is the best way.
> If we're going to do it by calling some newly-exposed function, I'd be
> inclined to fix it the same way in the back branches. Otherwise the
> discrepancy between the branches is a big back-patching hazard.
> (For instance, if we realize we need to fix a bug in the numeric-parsing
> code, what are the odds that we remember to fix hstore's additional copy
> in the back branches?)
>
> The "API break" isn't a big issue imo. The net effect would be that eg
> hstore 9.3.6 wouldn't work against a 9.3.5 server. We do that sort of
> thing *all the time* --- at least twice in the past year, according to
> a quick scan of the commit logs. If you were changing or removing a
> function that third-party code might depend on, it'd be problematic,
> but an addition has no such risk.
>
>

OK, here's the patch.

cheers

andrew

Attachment Content-Type Size
jsonnumberfix.patch text/x-diff 4.2 KB

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2014-11-30 21:31:40 Re: [HACKERS] BUG #12070: hstore extension: hstore_to_json_loose produces invalid JSON
Previous Message Tom Lane 2014-11-30 17:54:37 Re: BUG #12106: pg_dump does not resolve circular dependency

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2014-11-30 21:31:40 Re: [HACKERS] BUG #12070: hstore extension: hstore_to_json_loose produces invalid JSON
Previous Message David Rowley 2014-11-30 19:40:20 Re: Removing INNER JOINs