Sergiy Vyshnevetskiy <[EMAIL PROTECTED]> 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 ---------------------------(end of broadcast)--------------------------- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq