Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1X5ih1-00021S-Af for pgsql-bugs@arkaria.postgresql.org; Fri, 11 Jul 2014 21:49:23 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1X5ih0-0001BX-2f for pgsql-bugs@arkaria.postgresql.org; Fri, 11 Jul 2014 21:49:22 +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 1X5igz-0001BQ-4T for pgsql-bugs@postgresql.org; Fri, 11 Jul 2014 21:49:21 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1X5igv-0003UR-VP for pgsql-bugs@postgresql.org; Fri, 11 Jul 2014 21:49:20 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id s6BLnEDH021421; Fri, 11 Jul 2014 17:49:14 -0400 From: Tom Lane To: karel.knezourek@gmail.com cc: pgsql-bugs@postgresql.org Subject: Re: BUG #10922: row_to_json creates invalid JSON for currecy lower then 1000. In-reply-to: <20140711040653.2776.16311@wrigleys.postgresql.org> References: <20140711040653.2776.16311@wrigleys.postgresql.org> Comments: In-reply-to karel.knezourek@gmail.com message dated "Fri, 11 Jul 2014 04:06:53 -0000" Date: Fri, 11 Jul 2014 17:49:14 -0400 Message-ID: <21420.1405115354@sss.pgh.pa.us> X-Pg-Spam-Score: -2.6 (--) 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 karel.knezourek@gmail.com writes: > -- 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 Thanks for the report! I can't reproduce this on HEAD. I think it should have been resolved by commit 0ca6bda8e, but that was done a couple of days before we stamped 9.4beta1. Are you sure this is exactly beta1, and not some slightly earlier version? Your version() output looks like it predates beta1 ... regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs