Re: PostgresSQL 10 | Driver 42.2.5 | Float Conversion Issue

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: Andreas Joseph Krogh <andreas(at)visena(dot)com>, "Thangavel, Parameswaran" <Parameswaran(dot)Thangavel(at)rsa(dot)com>, "pgsql-jdbc(at)postgresql(dot)org" <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: PostgresSQL 10 | Driver 42.2.5 | Float Conversion Issue
Date: 2020-10-20 19:53:18
Message-ID: 674136.1603223598@sss.pgh.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

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

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Vladimir Sitnikov 2020-10-20 20:06:47 Re: PostgresSQL 10 | Driver 42.2.5 | Float Conversion Issue
Previous Message Andreas Joseph Krogh 2020-10-20 19:37:14 Re: PostgresSQL 10 | Driver 42.2.5 | Float Conversion Issue