pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Marko Tiikkaja <marko@joh.to>
To: alf.kristian@gmail.com
To: pgsql-bugs@postgresql.org
Subject: Re: BUG #9519: Allows storing scalar json, but fails when querying
Date: Mon, 10 Mar 2014 20:52:01 +0100
Message-ID: <531E17E1.9020009@joh.to> (raw)
In-Reply-To: <20140310150952.398.53642@wrigleys.postgresql.org>
References: <20140310150952.398.53642@wrigleys.postgresql.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

On 3/10/14, 4:09 PM, alf.kristian@gmail.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


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (14+ messages)  latest in thread

Message-ID: <531E17E1.9020009@joh.to>
Permalink:  ../531E17E1.9020009@joh.to/
Also on:    postgresql.org/message-id/531E17E1.9020009@joh.to

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: marko@joh.to, alf.kristian@gmail.com
  Subject: Re: BUG #9519: Allows storing scalar json, but fails when querying
  In-Reply-To: <531E17E1.9020009@joh.to>
  References: <20140310150952.398.53642@wrigleys.postgresql.org> <531E17E1.9020009@joh.to>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox