pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrew Dunstan <andrew@dunslane.net>
To: Tom Lane <tgl@sss.pgh.pa.us>
To: bouda@edookit.com
Cc: pgsql-bugs@postgresql.org
Cc: pgsql-hackers@postgresql.org
Subject: Re: [HACKERS] BUG #12070: hstore extension: hstore_to_json_loose produces invalid JSON
Date: Wed, 26 Nov 2014 12:03:16 -0500
Message-ID: <547607D4.7030508@dunslane.net> (raw)
In-Reply-To: <54760440.2080501@dunslane.net>
References: <20141126081059.15510.5034@wrigleys.postgresql.org>
	<15817.1417018789@sss.pgh.pa.us>
	<54760440.2080501@dunslane.net>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>


On 11/26/2014 11:48 AM, Andrew Dunstan wrote:
>
>
>
>
> In json.c we now check numbers like this:
>
>    JsonLexContext dummy_lex;
>    bool        numeric_error;
>    ...
>    dummy_lex.input = *outputstr == '-' ? outputstr + 1 : outputstr;
>    dummy_lex.input_length = strlen(dummy_lex.input);
>    json_lex_number(&dummy_lex, dummy_lex.input, &numeric_error);
>
> numeric_error is true IFF outputstr is a legal json number.

er is NOT a legal json number

cheers

andrew





-- 
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 (12+ messages)  latest in thread

Message-ID: <547607D4.7030508@dunslane.net>
Permalink:  ../547607D4.7030508@dunslane.net/
Also on:    postgresql.org/message-id/547607D4.7030508@dunslane.net

 · 

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: andrew@dunslane.net, tgl@sss.pgh.pa.us, bouda@edookit.com, pgsql-hackers@postgresql.org
  Subject: Re: [HACKERS] BUG #12070: hstore extension: hstore_to_json_loose produces invalid JSON
  In-Reply-To: <547607D4.7030508@dunslane.net>
  References: <20141126081059.15510.5034@wrigleys.postgresql.org> <15817.1417018789@sss.pgh.pa.us> <54760440.2080501@dunslane.net> <547607D4.7030508@dunslane.net>

* 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