| От | Tom Lane |
|---|---|
| Тема | Re: strange (numeric) casting behaviour |
| Дата | |
| Msg-id | 4809.1149029669@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | strange (numeric) casting behaviour (Sven Welte <Sven.Welte@gmxpro.net>) |
| Список | pgsql-bugs |
Sven Welte <Sven.Welte@gmxpro.net> writes:
> I'm experience some strange behaviour when casting numeric values.
This doesn't really have anything to do with casting as such. The
system thinks it can throw away the cast to NUMERIC(9,2) because the
function result is declared as already NUMERIC(9,2) ... but the function
is not actually constraining its result that way. In general a function
returning NUMERIC is considered to return unconstrained NUMERIC (and
likewise for VARCHAR etc).
Possibly we should disallow the length decoration on columns used in a
function result typedef, because it fools people into thinking that such
a decoration will be enforced.
regards, tom lane
В списке pgsql-bugs по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера