opfuncid of an OpExpr initially, considering that it has the information
at hand already. We'll still treat opfuncid as a cache rather than a
guaranteed-valid value, but this change saves one more syscache lookup
in the normal code path.
/* and build the expression node */
result = makeNode(ScalarArrayOpExpr);
result->opno = oprid(tup);
- result->opfuncid = InvalidOid;
+ result->opfuncid = opform->oprcode;
result->useOr = useOr;
result->args = args;
/* and build the expression node */
result = makeNode(OpExpr);
result->opno = oprid(op);
- result->opfuncid = InvalidOid;
+ result->opfuncid = opform->oprcode;
result->opresulttype = rettype;
result->opretset = get_func_retset(opform->oprcode);
result->args = args;
*
* Note that opfuncid is not necessarily filled in immediately on creation
* of the node. The planner makes sure it is valid before passing the node
- * tree to the executor, but during parsing/planning opfuncid is typically 0.
+ * tree to the executor, but during parsing/planning opfuncid can be 0.
*/
typedef struct OpExpr
{