Numeric modulo operator is incorrect.

Started by Ken-ichi Yamasakiabout 25 years ago1 messagesbugs
Jump to latest
#1Ken-ichi Yamasaki
yama@yuzu.gr.jp

Dear sir,

I build PostgreSQL 7.0.3 with jumbo-20010318.patch.gz on Vine Linux2.1.5.

Following result are incorrect. Am I under an illusion?

test=# select '34666624082'::numeric % '34666671'::numeric; ?column?
----------
-46918
(1 row)

test=# select '34666624082'::numeric - '34666671'::numeric
* trunc('34666624082'::numeric / '34666671'::numeric);
?column?
----------
34619753
(1 row)