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.g.johns...@gmail.com>
Date: Wednesday, March 7, 2018 at 12:11 PM
To: Martin Mueller <martinmuel...@northwestern.edu>
Cc: "pgsql-general@lists.postgresql.org" <pgsql-general@lists.postgresql.org>
Subject: Re: a very primitive question about division

On Wed, Mar 7, 2018 at 10:56 AM, Martin Mueller 
<martinmuel...@northwestern.edu<mailto:martinmuel...@northwestern.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.

Reply via email to