aboutsummaryrefslogtreecommitdiff
path: root/src/backend/parser/parse_oper.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2007-11-22 19:40:25 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2007-11-22 19:40:25 +0000
commitef48ed4c86e65c9a173ead5e08ec23f783849b51 (patch)
treec884f768a60130c3b816c23a7263935626822922 /src/backend/parser/parse_oper.c
parent6342f36d87522a3ee2b41f0abf9f7b13dfca2619 (diff)
downloadpostgresql-ef48ed4c86e65c9a173ead5e08ec23f783849b51.tar.gz
postgresql-ef48ed4c86e65c9a173ead5e08ec23f783849b51.zip
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.
Diffstat (limited to 'src/backend/parser/parse_oper.c')
-rw-r--r--src/backend/parser/parse_oper.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/backend/parser/parse_oper.c b/src/backend/parser/parse_oper.c
index 3367ee2a875..898c456b971 100644
--- a/src/backend/parser/parse_oper.c
+++ b/src/backend/parser/parse_oper.c
@@ -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;