| От | Heikki Linnakangas |
|---|---|
| Тема | Re: BUG #7807: "sign" function returns double |
| Дата | |
| Msg-id | 50F44961.2020305@vmware.com обсуждение исходный текст |
| Ответ на | BUG #7807: "sign" function returns double (a_rares@yahoo.com) |
| Список | pgsql-bugs |
On 14.01.2013 16:21, a_rares@yahoo.com wrote: > In the documentation > (http://www.postgresql.org/docs/9.1/static/functions-math.html) it is > written that the return type is the same as the input, but a query like > 'select sign(1::int)' returns a double It says that the input type is "dp or numeric", which means "double or numeric". So there are two overloaded functions called sign, sign(double), and sign(numeric). When the doc says that the return type is the same as input, it means that the return type is double, if you call sign(double), and numeric if you call sign(numeric). There is no sign(int) function, so the input "1::int" is cast to double, and the return type is also a double. - Heikki
В списке pgsql-bugs по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера