Re: numeric precision when raising one numeric to another.
| От | Alvaro Herrera |
|---|---|
| Тема | Re: numeric precision when raising one numeric to another. |
| Дата | |
| Msg-id | 20050524161000.GE8743@surnet.cl обсуждение исходный текст |
| Ответ на | Re: numeric precision when raising one numeric to another. (Tom Lane <tgl@sss.pgh.pa.us>) |
| Ответы |
Re: numeric precision when raising one numeric to another.
|
| Список | pgsql-general |
On Fri, May 20, 2005 at 01:03:08PM -0400, Tom Lane wrote:
> But having said that, I don't have a problem with putting in a
> pg_operator entry for numeric_power. And if someone wants to improve
> the scale factor calculations therein, go for it.
Oh, and while at it, it would be nice to solve the modulo bug that still
lurks there:
alvherre=# select 12345678901234567890 % 123;
?column?
----------
-45
(1 fila)
alvherre=# select 12345678901234567890 % 123::numeric(4,1);
?column?
----------
78.0
(1 fila)
alvherre=# select 12345678901234567890 % 123::numeric(3,0);
?column?
----------
-45
(1 fila)
alvherre=# select version();
version
----------------------------------------------------------------------------------------------
PostgreSQL 8.1devel on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.3.6 (Debian 1:3.3.6-4)
(1 fila)
--
Alvaro Herrera (<alvherre[a]surnet.cl>)
"I call it GNU/Linux. Except the GNU/ is silent." (Ben Reiter)
В списке pgsql-general по дате отправления: