Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kUxhF-0003NZ-ML for pgsql-jdbc@arkaria.postgresql.org; Tue, 20 Oct 2020 19:53:25 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kUxhD-0002m5-FC for pgsql-jdbc@arkaria.postgresql.org; Tue, 20 Oct 2020 19:53:23 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kUxhD-0002ly-9e for pgsql-jdbc@lists.postgresql.org; Tue, 20 Oct 2020 19:53:23 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kUxhB-0004oT-7k for pgsql-jdbc@postgresql.org; Tue, 20 Oct 2020 19:53:22 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 09KJrIrv674137; Tue, 20 Oct 2020 15:53:18 -0400 From: Tom Lane To: "David G. Johnston" cc: Andreas Joseph Krogh , "Thangavel, Parameswaran" , "pgsql-jdbc@postgresql.org" Subject: Re: PostgresSQL 10 | Driver 42.2.5 | Float Conversion Issue In-reply-to: References: <652597.1603214274@sss.pgh.pa.us> Comments: In-reply-to "David G. Johnston" message dated "Tue, 20 Oct 2020 12:30:47 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <674135.1603223598.1@sss.pgh.pa.us> Content-Transfer-Encoding: 8bit Date: Tue, 20 Oct 2020 15:53:18 -0400 Message-ID: <674136.1603223598@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk "David G. Johnston" writes: > On Tuesday, October 20, 2020, Andreas Joseph Krogh > wrote: >> Many, at least non-programmers, expect computers to act like calculators >> when it comes to numbers and arithmetic operations, and I can't blame them. > Our target audience here is programmers so while I agree with the > observation I don’t see its relevance. Programming computers and using > numbers means at some point you need to be at least aware of floating point > dynamics and choose appropriate data types. The SQL standard specifically defines FLOAT and DOUBLE PRECISION as being "approximate numeric types", and goes on at some length about the difference between those and "exact numeric types". Whether or not a SQL user has ever studied numerical analysis, I would expect her to be familiar with this property of the standard SQL data types. regards, tom lane