| От | Jonathan Ellis |
|---|---|
| Тема | Bug in how nulls are handled by plpgsql? |
| Дата | |
| Msg-id | 055301c0481a$6eb55120$0d00a8c0@dsl.inconnect.com обсуждение исходный текст |
| Ответы |
Re: Bug in how nulls are handled by plpgsql?
|
| Список | pgsql-general |
bf2=# create function foo (varchar, varchar) returns varchar as '
begin
return $1;
end;
' language 'plpgsql';
bf2'# bf2'# bf2'# bf2'# CREATE
bf2=# bf2=# select foo('asdf', null) from dual;
foo
-----
(1 row)
Even though the function foo never references the null, apparently postgres
thinks, "oh, a function call with a null in it. Must be null." and doesn't
even bother executing the function. Bug?
On another null-related note, is there any way to make
select 'asdf' || null from dual
return 'asdf' without changing it to
select 'asdf' || coalesce(null, '') from dual
?
-Jonathan
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера