Re: a very primitive question about division

From: Martin Mueller <martinmueller(at)northwestern(dot)edu>
To: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: a very primitive question about division
Date: 2018-03-07 18:41:36
Message-ID: 353422DD-62B4-4301-B9D4-E42BD03E3376@northwestern.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I see the logic of that, but I also think that this is not how many users think when they want to know how to get results for 4/9. Note that division is a great stumbling block in middle school. They want to know how to divide four by nine and don’t want to think about division and formatting as separate operations to be looked up in separate chapters. Perhaps they should think that way, but they don’t, and as Adenauer, modern Germany’s first chancellor, observed: you have to take people as they come because there are no others.

At the least the table 9.5 in 9.3 could have an NB about the problem of decimals in division, together with an example of how to do 4/9 in different formats, and a reference to the fuller discussion.

From: "David G. Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Date: Wednesday, March 7, 2018 at 12:11 PM
To: Martin Mueller <martinmueller(at)northwestern(dot)edu>
Cc: "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: a very primitive question about division

On Wed, Mar 7, 2018 at 10:56 AM, Martin Mueller <martinmueller(at)northwestern(dot)edu<mailto:martinmueller(at)northwestern(dot)edu>> wrote:
But there is no example of 4/9 and the different ways of formatting it as a decimal fraction with different options for rounding or a percentage.

​That would be the responsibility of the "Data Type Formatting Functions" chapter and the "to_char" function it describes.

David J.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message PegoraroF10 2018-03-07 19:01:33 Replication pull instead of push
Previous Message David G. Johnston 2018-03-07 18:11:45 Re: a very primitive question about division