Re: BUG #2954: null is not checked against domain constraints in return clause

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #2954: null is not checked against domain constraints in return clause
Дата
Msg-id 22980.1170358517@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: BUG #2954: null is not checked against domain constraints in return clause  (Sergiy Vyshnevetskiy <serg@vostok.net>)
Список pgsql-bugs
Sergiy Vyshnevetskiy <serg@vostok.net> writes:
> I believe the bug to be here:
>        /* Normal case for scalar results */
>        estate->retval = exec_eval_expr(estate, stmt->expr,
>                        &(estate->retisnull),
>                        &(estate->rettype));

> in exec_stmt_return() in pl_exec.c.

No, I don't think that code is wrong, the problem is that it's never
reached.  See the
        else if (!estate.retisnull)
line a bit further up.  Probably you can fix it with a small change to
check type strictness there.

            regards, tom lane

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #2948: default null values for not-null domains
Следующее
От: Sergiy Vyshnevetskiy
Дата:
Сообщение: Re: BUG #2948: default null values for not-null domains