| От | Dwayne Towell |
|---|---|
| Тема | Re: BUG #8516: Calling VOLATILE from STABLE function |
| Дата | |
| Msg-id | 1c4601cec60d$ed9bfaa0$c8d3efe0$@docketnavigator.com обсуждение исходный текст |
| Ответ на | Re: BUG #8516: Calling VOLATILE from STABLE function (Bruce Momjian <bruce@momjian.us>) |
| Список | pgsql-bugs |
> According to the documentation, f() should be marked VOLATILE also, since > calling f() produces side effects. PostgreSQL does not give a warning (or > better yet, an error); I think it should. I think the answer is that function authors are required to prevent functions they mark as STABLE from calling VOLATILE functions. -- I understand it's an error (at least usually), my question/issue is why does PostgreSQL NOT give at least a warning when a programmer (probably accidentally) calls a VOLATILE function in one that he has specifically tagged as STABLE? The compiler has all the information to notify the programmer of a mistake, but isn't. This violates a fundamental principle of software engineering--take every opportunity to prevent errors. Dwayne
В списке pgsql-bugs по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера