pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: David G. Johnston <david.g.johnston@gmail.com>
Cc: Andreas Joseph Krogh <andreas@visena.com>
Cc: Thangavel, Parameswaran <Parameswaran.Thangavel@rsa.com>
Cc: pgsql-jdbc@postgresql.org <pgsql-jdbc@postgresql.org>
Subject: Re: PostgresSQL 10 | Driver 42.2.5 | Float Conversion Issue
Date: Tue, 20 Oct 2020 15:53:18 -0400
Message-ID: <674136.1603223598@sss.pgh.pa.us> (raw)
In-Reply-To: <CAKFQuwYa=VsYuhCYEn+jCWc_s52h-oOVRzL696iQSJKHHbELOg@mail.gmail.com>
References: <CH2PR19MB3798B6096BD4EA60C2068367831F0@CH2PR19MB3798.namprd19.prod.outlook.com>
	<VisenaEmail.9.b226ab802321bcdc.17544a6d3e3@tc7-visena>
	<CH2PR19MB3798DAEA77750DD4F4CE67A0831F0@CH2PR19MB3798.namprd19.prod.outlook.com>
	<VisenaEmail.e.3213a432433c7179.17544c1d629@tc7-visena>
	<CAKFQuwbbYTc63HeEBPXcDzPU28Do4z+y9ZEwQKVFwCnbPP1FaQ@mail.gmail.com>
	<VisenaEmail.90.b09bf69bfcec8e52.17546ec4f83@tc7-visena>
	<652597.1603214274@sss.pgh.pa.us>
	<VisenaEmail.91.1593ba84a90d02a5.17547533c82@tc7-visena>
	<CAKFQuwYwsp7-5WUPsgg_ZpbtOOQ9kuvbEsD1LWLboz2qD80uwQ@mail.gmail.com>
	<VisenaEmail.98.ebf0ca280ce8e2b7.175476a101e@tc7-visena>
	<CAKFQuwYa=VsYuhCYEn+jCWc_s52h-oOVRzL696iQSJKHHbELOg@mail.gmail.com>

"David G. Johnston" <david.g.johnston@gmail.com> writes:
> On Tuesday, October 20, 2020, Andreas Joseph Krogh <andreas@visena.com>
> 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





view thread (19+ messages)  latest in thread

Message-ID: <674136.1603223598@sss.pgh.pa.us>
Permalink:  ../674136.1603223598@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/674136.1603223598@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: tgl@sss.pgh.pa.us, david.g.johnston@gmail.com, andreas@visena.com, Parameswaran.Thangavel@rsa.com
  Subject: Re: PostgresSQL 10 | Driver 42.2.5 | Float Conversion Issue
  In-Reply-To: <674136.1603223598@sss.pgh.pa.us>
  References: <CH2PR19MB3798B6096BD4EA60C2068367831F0@CH2PR19MB3798.namprd19.prod.outlook.com> <VisenaEmail.9.b226ab802321bcdc.17544a6d3e3@tc7-visena> <CH2PR19MB3798DAEA77750DD4F4CE67A0831F0@CH2PR19MB3798.namprd19.prod.outlook.com> <VisenaEmail.e.3213a432433c7179.17544c1d629@tc7-visena> <CAKFQuwbbYTc63HeEBPXcDzPU28Do4z+y9ZEwQKVFwCnbPP1FaQ@mail.gmail.com> <VisenaEmail.90.b09bf69bfcec8e52.17546ec4f83@tc7-visena> <652597.1603214274@sss.pgh.pa.us> <VisenaEmail.91.1593ba84a90d02a5.17547533c82@tc7-visena> <CAKFQuwYwsp7-5WUPsgg_ZpbtOOQ9kuvbEsD1LWLboz2qD80uwQ@mail.gmail.com> <VisenaEmail.98.ebf0ca280ce8e2b7.175476a101e@tc7-visena> <CAKFQuwYa=VsYuhCYEn+jCWc_s52h-oOVRzL696iQSJKHHbELOg@mail.gmail.com> <674136.1603223598@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox