Re: BUG #9519: Allows storing scalar json, but fails when querying

From: Marko Tiikkaja <marko(at)joh(dot)to>
To: alf(dot)kristian(at)gmail(dot)com, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #9519: Allows storing scalar json, but fails when querying
Date: 2014-03-10 19:52:01
Message-ID: 531E17E1.9020009@joh.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On 3/10/14, 4:09 PM, alf(dot)kristian(at)gmail(dot)com wrote:
> I think the insert should fail, since '1' is not valid JSON.

It's a valid "JSON value", it's just not an object. If you only want to
store JSON objects in the table, consider using a CHECK constraint.

Regards,
Marko Tiikkaja

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message John R Pierce 2014-03-10 20:00:15 Re: BUG #9519: Allows storing scalar json, but fails when querying
Previous Message alf.kristian 2014-03-10 15:09:52 BUG #9519: Allows storing scalar json, but fails when querying