Re: plpgsql raise - parameters can be expressions - Mailing list pgsql-patches

From Tom Lane
Subject Re: plpgsql raise - parameters can be expressions
Date
Msg-id 24042.1118724645@sss.pgh.pa.us
Whole thread Raw
In response to Re: plpgsql raise - parameters can be expressions  (Neil Conway <neilc@samurai.com>)
Responses Re: plpgsql raise - parameters can be expressions
List pgsql-patches
Neil Conway <neilc@samurai.com> writes:
> ... One question is whether we should make use of
> exec_eval_expr() by representing the RAISE parameter list as a list of
> expressions (each of which would likely be simple enough to evaluate via
> ExecEvalExpr()), or whether we want to extend exec_eval_expr() to handle
>   expressions that yield multiple attributes.

I'd lean to the former myself --- which actually does suggest that this
patch is not ready for application yet, because it banks on the
assumption that "x,y,z" should be treated as a single expression.

Now that I think about it, the amount of overhead in that assumption is
pretty high: there's tuple construction and deconstruction involved,
no matter how simple the individual datatypes are.  So I'd definitely
prefer to see it changed.

            regards, tom lane

pgsql-patches by date:

Previous
From: Neil Conway
Date:
Subject: Re: plpgsql raise - parameters can be expressions
Next
From: Neil Conway
Date:
Subject: Re: plpgsql raise - parameters can be expressions