mirror of
https://github.com/postgres/postgres.git
synced 2025-06-14 18:42:34 +03:00
Actually ... it's pretty silly that parse_oper.c doesn't set up the
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.
This commit is contained in:
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/parser/parse_oper.c,v 1.97 2007/11/15 21:14:37 momjian Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/parser/parse_oper.c,v 1.98 2007/11/22 19:40:25 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -939,7 +939,7 @@ make_scalar_array_op(ParseState *pstate, List *opname,
|
||||
/* 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;
|
||||
|
||||
@ -1011,7 +1011,7 @@ make_op_expr(ParseState *pstate, Operator op,
|
||||
/* 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;
|
||||
|
Reference in New Issue
Block a user