Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1eqPLb-0001Ij-8J for pgsql-bugs@arkaria.postgresql.org; Mon, 26 Feb 2018 20:26:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1eqPLa-0007oh-8P for pgsql-bugs@arkaria.postgresql.org; Mon, 26 Feb 2018 20:26:06 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1eqPLZ-0007oY-Vo for pgsql-bugs@lists.postgresql.org; Mon, 26 Feb 2018 20:26:06 +0000 Received: from lungold.riddles.org.uk ([82.68.208.19]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1eqPLW-0007UL-KL for pgsql-bugs@lists.postgresql.org; Mon, 26 Feb 2018 20:26:04 +0000 Received: from [192.168.127.1] (port=24350 helo=caithnard.riddles.org.uk) by lungold.riddles.org.uk with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.88 (FreeBSD)) (envelope-from ) id 1eqPLR-000HPy-E6; Mon, 26 Feb 2018 20:25:57 +0000 Received: from [127.0.0.1] (port=57979 helo=caithnard.riddles.org.uk) by caithnard.riddles.org.uk with esmtp (Exim 4.89 (FreeBSD)) (envelope-from ) id 1eqPLQ-0008w4-Jh; Mon, 26 Feb 2018 20:25:56 +0000 From: Andrew Gierth To: Tom Lane Cc: michael.aiello@asg.com, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #15091: to_number() returns incorrect value In-Reply-To: <27576.1519667309@sss.pgh.pa.us> (Tom Lane's message of "Mon, 26 Feb 2018 12:48:29 -0500") Message-ID: <87muzvmtiw.fsf@news-spur.riddles.org.uk> References: <151965334143.21242.9862077287740270901@wrigleys.postgresql.org> <27576.1519667309@sss.pgh.pa.us> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (berkeley-unix) Date: Mon, 26 Feb 2018 20:25:55 +0000 MIME-Version: 1.0 Content-Type: text/plain List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk >>>>> "Tom" == Tom Lane writes: Tom> Tested at Tom> http://rextester.com/l/oracle_online_compiler The problem is that this tester is defaulting to a German locale and using . as a thousands separator and , as decimal point, as shown by this query: select * from nls_session_parameters where parameter in ('NLS_TERRITORY','NLS_NUMERIC_CHARACTERS') If you do ALTER SESSION SET NLS_TERRITORY = 'AMERICA' \\ SELECT to_number('123.0', 'FM9999999') FROM DUAL then the result is, as expected, ORA-01722: invalid number -- Andrew (irc:RhodiumToad)