Re: R: round(x) function

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: R: round(x) function
Дата
Msg-id 20164.1269635639@sss.pgh.pa.us
обсуждение исходный текст
Ответ на R: round(x) function  ("Gaietti, Mauro \(SELEX GALILEO Guest, Italy\)" <mauro.gaietti@guests.selexgalileo.com>)
Список pgsql-general
"Gaietti, Mauro \(SELEX GALILEO Guest, Italy\)" <mauro.gaietti@guests.selexgalileo.com> writes:
> I think this is not consistent with documentation that says there is
> just one round function, with one argument of numeric type.

The documentation you're quoting says there is just one round function
that takes *two* arguments.  Which is true:

regression=# \df round
                          List of functions
   Schema   | Name  | Result data type | Argument data types |  Type
------------+-------+------------------+---------------------+--------
 pg_catalog | round | double precision | double precision    | normal
 pg_catalog | round | numeric          | numeric             | normal
 pg_catalog | round | numeric          | numeric, integer    | normal
(3 rows)

I don't think there's a claim anywhere that the numeric and double
precision versions of round(x) act identically.  They hardly could be
exactly identical anyway given the different properties of the two
datatypes.

            regards, tom lane

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

Предыдущее
От: "Gaietti, Mauro \(SELEX GALILEO Guest, Italy\)"
Дата:
Сообщение: R: round(x) function
Следующее
От: Bryan Murphy
Дата:
Сообщение: Re: Warm Standby Setup Documentation