Search Postgresql Archives

Re: a very primitive question about division

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Mar 7, 2018 at 10:30 AM, Martin Mueller <martinmueller@xxxxxxxxxxxxxxxx> wrote:

Thanks.  So  round(before1550/colfreq::numeric, 2)  produces the desired result. 

 

The explanations and examples of string functions in the Postgres documentation are a model of clarity. The explanations and examples of basic arithmetic operations  are not.  There is room for improvement there.



Possibly.  Patches (or even just email suggestions - though the former are generally more apt to get applied) detailing specific improvements to make are welcome.

The description "division (integer division truncates the result)" seems reasonably clear - if you don't want the result truncated, and have two integers, you have to make one of the inputs a non-integer.  Of the various options I tend to choose numeric though others are possible.

David J.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux