aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor/nodeIndexscan.c
diff options
context:
space:
mode:
authorMarc G. Fournier <scrappy@hub.org>1996-11-08 00:46:14 +0000
committerMarc G. Fournier <scrappy@hub.org>1996-11-08 00:46:14 +0000
commitb38d565fc3e9874e8709d1767bdae94393fe8179 (patch)
treefd0ecea61adad0bafefda51b5fbd25433c98c519 /src/backend/executor/nodeIndexscan.c
parentb8003d098b46013e10547d3cb53d55cbfc2667e0 (diff)
downloadpostgresql-b38d565fc3e9874e8709d1767bdae94393fe8179.tar.gz
postgresql-b38d565fc3e9874e8709d1767bdae94393fe8179.zip
D'Arcy's recent cleanups
Diffstat (limited to 'src/backend/executor/nodeIndexscan.c')
-rw-r--r--src/backend/executor/nodeIndexscan.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/backend/executor/nodeIndexscan.c b/src/backend/executor/nodeIndexscan.c
index db918eb3cd3..12b5a9c6c75 100644
--- a/src/backend/executor/nodeIndexscan.c
+++ b/src/backend/executor/nodeIndexscan.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/executor/nodeIndexscan.c,v 1.4 1996/11/06 06:47:42 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/executor/nodeIndexscan.c,v 1.5 1996/11/08 00:45:57 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
@@ -593,14 +593,12 @@ ExecInitIndexScan(IndexScan *node, EState *estate, Plan *parent)
n_keys = length(qual);
scan_keys = (n_keys <= 0) ? NULL :
(ScanKey)palloc(n_keys * sizeof(ScanKeyData));
+ run_keys = (n_keys <= 0) ? NULL :
+ (int *)palloc(n_keys * sizeof(int));
CXT1_printf("ExecInitIndexScan: context is %d\n",
CurrentMemoryContext);
- if (n_keys > 0) {
- run_keys = (int *) palloc(n_keys * sizeof(int));
- }
-
/* ----------------
* for each opclause in the given qual,
* convert each qual's opclause into a single scan key
@@ -613,9 +611,9 @@ ExecInitIndexScan(IndexScan *node, EState *estate, Plan *parent)
Node *rightop; /* expr on rhs ... */
int scanvar; /* which var identifies varattno */
- AttrNumber varattno; /* att number used in scan */
+ AttrNumber varattno = 0; /* att number used in scan */
Oid opid; /* operator id used in scan */
- Datum scanvalue; /* value used in scan (if const) */
+ Datum scanvalue = 0; /* value used in scan (if const) */
/* ----------------
* extract clause information from the qualification