BUG #15154: hstore_to_jsonb_loose erroneously casting scientificnotation number strings - Mailing list pgsql-bugs

From PG Bug reporting form
Subject BUG #15154: hstore_to_jsonb_loose erroneously casting scientificnotation number strings
Date
Msg-id 152361760563.31235.2272883764639129559@wrigleys.postgresql.org
Whole thread Raw
List pgsql-bugs
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?


pgsql-bugs by date:

Previous
From: PG Bug reporting form
Date:
Subject: BUG #15153: Serialize error (40001) on first statement suggestion
Next
From: Arthur Zakirov
Date:
Subject: Re: BUG #15150: Reading uninitialised value in NISortAffixes(tsearch/spell.c)