Re: [PATCH] hstore_to_json: empty hstores must return empty json objects - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: [PATCH] hstore_to_json: empty hstores must return empty json objects
Date
Msg-id 525FE720.50405@dunslane.net
Whole thread Raw
In response to Re: [PATCH] hstore_to_json: empty hstores must return empty json objects  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
On 10/17/2013 08:20 AM, Robert Haas wrote:
> On Wed, Oct 16, 2013 at 12:02 PM, Oskari Saarenmaa <os@ohmu.fi> wrote:
>> hstore_to_json used to return an empty string for empty hstores, but
>> that is not correct as an empty string is not valid json and calling
>> row_to_json() on rows which have empty hstores will generate invalid
>> json for the entire row.  The right thing to do is to return an empty
>> json object.
> Hmm.  This sure looks like a bug to me.
>
> Anyone think otherwise?
>

No, you're right. It was a thinko on my part. :-(

cheers

andrew



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Unitialized Values in record_image_cmp
Next
From: Fabien COELHO
Date:
Subject: Re: [PATCH] pg_sleep(interval)