Re: a very primitive question about division
От | David G. Johnston |
---|---|
Тема | Re: a very primitive question about division |
Дата | |
Msg-id | CAKFQuwbb7e_jXLxxY83-=WV-jQ_97MvOe-kH5J3KFv0H-bpNnQ@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: a very primitive question about division (Martin Mueller <martinmueller@northwestern.edu>) |
Ответы |
Re: a very primitive question about division
|
Список | pgsql-general |
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.
В списке pgsql-general по дате отправления: