Обсуждение: BUG #15154: hstore_to_jsonb_loose erroneously casting scientificnotation number strings

Поиск
Список
Период
Сортировка

BUG #15154: hstore_to_jsonb_loose erroneously casting scientificnotation number strings

От
PG Bug reporting form
Дата:
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?