Commit fb24bfa3 authored by Vadim B. Mikheev's avatar Vadim B. Mikheev

INDEXSCAN_PATCH changes: should work for (Param OP VAR) too

(but I didn't test FUNC OP PARAM and PARAM OP FUNC - no time)
parent 1aa1827d
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/clauses.c,v 1.5 1996/11/30 17:48:52 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/optimizer/util/clauses.c,v 1.6 1997/01/22 06:30:57 vadim Exp $
* *
* HISTORY * HISTORY
* AUTHOR DATE MAJOR EVENT * AUTHOR DATE MAJOR EVENT
...@@ -649,6 +649,14 @@ get_relattval(Node *clause, ...@@ -649,6 +649,14 @@ get_relattval(Node *clause,
*constval = 0; *constval = 0;
*flag = (_SELEC_NOT_CONSTANT_); *flag = (_SELEC_NOT_CONSTANT_);
} }
#ifdef INDEXSCAN_PATCH
} else if (is_opclause(clause) && IsA(right,Var) && IsA(left,Param)) {
/* ...And here... - vadim 01/22/97 */
*relid = right->varno;
*attno = right->varattno;
*constval = 0;
*flag = (_SELEC_NOT_CONSTANT_);
#endif
} else { } else {
/* One or more of the operands are expressions /* One or more of the operands are expressions
* (e.g., oper clauses) * (e.g., oper clauses)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment