The following bug has been logged on the website:
Bug reference: 12070
Logged by: OndÅej Bouda
Email address: bouda@edookit.com
PostgreSQL version: 9.4beta2
Operating system: Windows 7 64bit
Description:
The hstore_to_json_loose(hstore) produces an invalid JSON in the following
case:
SELECT hstore_to_json_loose(hstore(ARRAY ['name'], ARRAY ['1.'] :: TEXT
[]))
Output: {"name": 1.}
Expected:
either {"name": "1."}
or {"name": 1}
(the latter being the preferred one so that it produces the same JSON as
hstore_to_jsonb_loose(hstore))
The actual output is indeed incorrect as JSON does not permit `1.` - it must
be a string.
Tested with PostgreSQL 9.4 RC1 and still wrong.