pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: marc@marcgreenstock.com
Subject: BUG #15154: hstore_to_jsonb_loose erroneously casting scientific notation number strings
Date: Fri, 13 Apr 2018 11:06:45 +0000
Message-ID: <152361760563.31235.2272883764639129559@wrigleys.postgresql.org> (raw)

The following bug has been logged on the website:

Bug reference:      15154
Logged by:          Marc Greenstock
Email address:      marc@marcgreenstock.com
PostgreSQL version: 9.6.0
Operating system:   64bit Amazon Linux/2.7.2
Description:        

hstore_to_jsonb_loose is erroneously casting strings that appear in
scientific notation into numbers raising a "value overflows numeric format"
error.

select hstore_to_jsonb_loose('a=>"557236406134e62000323100"')
ERROR:  value overflows numeric format

Ideally hstore_to_jsonb_loose should not attempt to cast strings. But I
understand this may be problematic for other use-cases.

Could there be a solution which adds a new method of contrib/hstore?
Something in-between hstore_to_json and hstore_to_jsonb_loose that does not
attempt any conversion?



Message-ID: <152361760563.31235.2272883764639129559@wrigleys.postgresql.org>
Permalink:  ../152361760563.31235.2272883764639129559@wrigleys.postgresql.org/
Also on:    postgresql.org/message-id/152361760563.31235.2272883764639129559@wrigleys.postgresql.org

 · 

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: noreply@postgresql.org, marc@marcgreenstock.com
  Subject: Re: BUG #15154: hstore_to_jsonb_loose erroneously casting scientific notation number strings
  In-Reply-To: <152361760563.31235.2272883764639129559@wrigleys.postgresql.org>
  References: <152361760563.31235.2272883764639129559@wrigleys.postgresql.org>

* 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