[prev in list] [next in list] [prev in thread] [next in thread]
List: pgsql-bugs
Subject: [BUGS] BUG #11103: to_json() does not convert correctly DOMAINs type since 9.3.5 (int expected inste
From: dgrelaud () ideolys ! com
Date: 2014-07-31 15:24:56
Message-ID: 20140731152456.2708.35688 () wrigleys ! postgresql ! org
[Download RAW message or body]
The following bug has been logged on the website:
Bug reference: 11103
Logged by: David GRELAUD
Email address: dgrelaud@ideolys.com
PostgreSQL version: 9.3.5
Operating system: Ubuntu 12.04 or Mac OS X 10.9
Description:
Hi,
The function to_json() does not convert correctly (= as before) DOMAINs
since 9.3.5. It was OK in 9.3.4.
Here is a minimal test case :
CREATE DOMAIN UNSIGNED_INT4 AS INT4 CHECK (VALUE >= 0);
SELECT to_json(2::UNSIGNED_INT4);
With 9.3.5, it returns a JSON string : '2' (with quotes)
With 9.3.4, it returns a JSON int : 2 (without quotes)
The same behavior happens with array_to_json() and maybe others related
functions...
If we do not use domains, SELECT to_json(2::INT4) returns always a JSON int
(even with 9.3.5).
Is it related to the change made by Tom Lane?
commit 0ca6bda8e7501947c05f30c127f6d12ff90b5a64 and the release note 9.3.5
"Fix identification of input type category in to_json() and friends (Tom
Lane)"?
Is it volontary? If so, don't worry, I will find a workaround.
Thank you very much for maintaining this wonderfull Open Source database.
David.
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic