Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1X5dnM-0001QX-CG for pgsql-bugs@arkaria.postgresql.org; Fri, 11 Jul 2014 16:35:36 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1X5dnL-0007l3-RN for pgsql-bugs@arkaria.postgresql.org; Fri, 11 Jul 2014 16:35:35 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1X5S72-0006Za-SZ for pgsql-bugs@postgresql.org; Fri, 11 Jul 2014 04:07:08 +0000 Received: from wrigleys.postgresql.org ([204.145.124.246]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1X5S6w-0008R6-2J for pgsql-bugs@postgresql.org; Fri, 11 Jul 2014 04:07:07 +0000 MIME-Version: 1.0 Subject: BUG #10922: row_to_json creates invalid JSON for currecy lower then 1000. To: pgsql-bugs@postgresql.org From: karel.knezourek@gmail.com Date: Fri, 11 Jul 2014 04:06:53 +0000 Message-ID: <20140711040653.2776.16311@wrigleys.postgresql.org> X-Pg-Spam-Score: -0.3 (/) Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org The following bug has been logged on the website: Bug reference: 10922 Logged by: Karel Knezourek Email address: karel.knezourek@gmail.com PostgreSQL version: 9.4beta1 Operating system: linux Description: select version(); --"PostgreSQL 9.4devel on x86_64-unknown-linux-gnu, compiled by gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-4), 64-bit" --"PostgreSQL 9.3.4, compiled by Visual C++ build 1600, 64-bit" -- TEST CASE CREATE TABLE test ( currency money ); INSERT INTO test(currency) SELECT '1.34'::float8::numeric::money; INSERT INTO test(currency) SELECT '1000.34'::float8::numeric::money; SELECT row_to_json(t) FROM (SELECT * FROM TEST) t; --{"currency":1,34 Kč} NOT OK !!! it is not valid JSON without double quotes --{"currency":"1 000,34 Kč"} OK drop table test; -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs