Re: pgsql: Fix NUMERIC modulus to properly truncate

Поиск
Список
Период
Сортировка
Искать
От
Christopher Kings-Lynne
Тема
Re: pgsql: Fix NUMERIC modulus to properly truncate
Дата
Msg-id
42A1CB9E.7090400@familyhealth.com.au
Ответ на
Список
Дерево обсуждения
pgsql: Fix NUMERIC modulus to properly truncate division in computation. momjian@svr1.postgresql.org (Bruce Momjian)
Re: pgsql: Fix NUMERIC modulus to properly truncate Christopher Kings-Lynne <chriskl@familyhealth.com.au>
Re: pgsql: Fix NUMERIC modulus to properly truncate Bruce Momjian <pgman@candle.pha.pa.us>
Re: pgsql: Fix NUMERIC modulus to properly truncate Christopher Kings-Lynne <chriskl@familyhealth.com.au>
Re: pgsql: Fix NUMERIC modulus to properly truncate Tom Lane <tgl@sss.pgh.pa.us>
Is this a backport?

Bruce Momjian wrote:
> Log Message:
> -----------
> Fix NUMERIC modulus to properly truncate division in computation. 
> Division rounding was causing incorrect results.  Test case:
> 
> 	test=> SELECT 12345678901234567890 % 123;
> 	 ?column?
> 	----------
> 	       78
> 	(1 row)
> 
> Was returning -45.
> 
> Modified Files:
> --------------
>     pgsql/src/backend/utils/adt:
>         numeric.c (r1.83 -> r1.84)
>         (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/numeric.c.diff?r1=1.83&r2=1.84)
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
>       subscribe-nomail command to majordomo@postgresql.org so that your
>       message can get through to the mailing list cleanly
В списке pgsql-committers по дате отправления
От: momjian@svr1.postgresql.org (Bruce Momjian)
Дата:
От: Bruce Momjian
Дата:
FAQ