Re: Modulus operator returns negative values / numeric

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Modulus operator returns negative values / numeric
Дата
Msg-id 20050526154201.GE7589@surnet.cl
обсуждение исходный текст
Ответ на Re: Modulus operator returns negative values / numeric  (Paul Tillotson <pntil@shentel.net>)
Список pgsql-general
On Thu, May 26, 2005 at 08:56:34AM -0400, Paul Tillotson wrote:
> Tom Lane wrote:
>
> >Paul Tillotson <pntil@shentel.net> writes:

> In other words, no arbitrary number of extra decimal places when calling
> div_var() will be always sufficient to prevent rounding up at some other
> decimal place.

No, an arbitrary number won't do.  I found I could make it work by
adding as much extra decimals as digits in the divisor.  At least it
worked for these test cases I made up.  (Attached)

> >I cannot believe that that won't create problems at least as bad as it
> >solves.  Have you even tried the regression tests on this?

> <sheepish grin>  No.  Can you tell me how to do that?

make installcheck in src/test/regress

--
Alvaro Herrera (<alvherre[a]surnet.cl>)
"Cómo ponemos nuestros dedos en la arcilla del otro. Eso es la amistad; jugar
al alfarero y ver qué formas se pueden sacar del otro" (C. Halloway en
La Feria de las Tinieblas, R. Bradbury)

Вложения

В списке pgsql-general по дате отправления:

Предыдущее
От: Douglas McNaught
Дата:
Сообщение: Re: Query for importing and exporting data from a database
Следующее
От: "David M. Lee"
Дата:
Сообщение: Portability of pgsql database files.