Re: ERROR: function round(double precision, integer) does not exist - WTF?
| От | Glen Parker |
|---|---|
| Тема | Re: ERROR: function round(double precision, integer) does not exist - WTF? |
| Дата | |
| Msg-id | 001f01c40264$685e4450$0b01a8c0@saturn обсуждение исходный текст |
| Ответ на | ERROR: function round(double precision, integer) does not exist - WTF? ("Glen Parker" <glenebob@nwlink.com>) |
| Ответы |
Re: ERROR: function round(double precision, integer) does not exist - WTF?
|
| Список | pgsql-general |
> The guideline we've used for implicit coercions is that in > the numeric type family, only "up conversions" are implicit, that is > int2->int4->int8->numeric->float4->float8. "Down conversions" are > marked as assignment-only. Without some such restriction, > there's nothing to keep the parser from making very > surprising choices of operators. I was unaware of the details, yes, but your explanation makes perfect sense. When I say it's broken though, I'm talking more specifically about trying to use round(float, int); is there some reason that this function overload should not exist in the absence of an implicit float->numeric cast? Rounding a floating-point to a specific number of decimal places is a common enough operation after all... Glen Parker
В списке pgsql-general по дате отправления: