Kris Jurka <books@ejurka.com> writes:
> I have been looking at this and the NULLIF case seems complicatd.
> Essentially for NULLIF(left,right) I want to ExecEvalExpr(left,...)
> and construct a Const node with the result. Then makeSimpleA_Expr for
> const left = right.
Uh, no; you are confusing parse-time and run-time work. What you
probably want is a new node type that includes the OID of the
appropriate "=" operator but does different things with the result
than a normal "=" invocation would do.
Actually, thinking about it that way, it might just be a small variant
on the DistinctExpr node type that exists in current sources. Certainly
DistinctExpr would be a good model to look at.
regards, tom lane