Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitef48ed4

Browse files
committed
Actually ... it's pretty silly that parse_oper.c doesn't set up the
opfuncid of an OpExpr initially, considering that it has the informationat hand already. We'll still treat opfuncid as a cache rather than aguaranteed-valid value, but this change saves one more syscache lookupin the normal code path.
1 parent6342f36 commitef48ed4

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

‎src/backend/parser/parse_oper.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/parser/parse_oper.c,v 1.97 2007/11/15 21:14:37 momjian Exp $
11+
* $PostgreSQL: pgsql/src/backend/parser/parse_oper.c,v 1.98 2007/11/22 19:40:25 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -939,7 +939,7 @@ make_scalar_array_op(ParseState *pstate, List *opname,
939939
/* and build the expression node */
940940
result=makeNode(ScalarArrayOpExpr);
941941
result->opno=oprid(tup);
942-
result->opfuncid=InvalidOid;
942+
result->opfuncid=opform->oprcode;
943943
result->useOr=useOr;
944944
result->args=args;
945945

@@ -1011,7 +1011,7 @@ make_op_expr(ParseState *pstate, Operator op,
10111011
/* and build the expression node */
10121012
result=makeNode(OpExpr);
10131013
result->opno=oprid(op);
1014-
result->opfuncid=InvalidOid;
1014+
result->opfuncid=opform->oprcode;
10151015
result->opresulttype=rettype;
10161016
result->opretset=get_func_retset(opform->oprcode);
10171017
result->args=args;

‎src/include/nodes/primnodes.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
1111
* Portions Copyright (c) 1994, Regents of the University of California
1212
*
13-
* $PostgreSQL: pgsql/src/include/nodes/primnodes.h,v 1.135 2007/11/15 22:25:17 momjian Exp $
13+
* $PostgreSQL: pgsql/src/include/nodes/primnodes.h,v 1.136 2007/11/22 19:40:25 tgl Exp $
1414
*
1515
*-------------------------------------------------------------------------
1616
*/
@@ -302,7 +302,7 @@ typedef struct FuncExpr
302302
*
303303
* Note that opfuncid is not necessarily filled in immediately on creation
304304
* of the node. The planner makes sure it is valid before passing the node
305-
* tree to the executor, but during parsing/planning opfuncidis typically 0.
305+
* tree to the executor, but during parsing/planning opfuncidcan be 0.
306306
*/
307307
typedefstructOpExpr
308308
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp