summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Momjian2000-01-11 03:33:14 +0000
committerBruce Momjian2000-01-11 03:33:14 +0000
commitbd52f4bffdbdd7d87bab308ff2abd61fb9f2d490 (patch)
tree93e9c5627b77004e23a5e8e5f8857c9e7049666d
parentaadd14b8f29ea2e29ccbb8fbda8eccdb8cff8fc2 (diff)
More cleanups. Still doesn't work.
-rw-r--r--src/backend/access/common/indextuple.c7
-rw-r--r--src/backend/commands/indexcmds.c6
-rw-r--r--src/backend/libpq/be-pqexec.c6
-rw-r--r--src/backend/optimizer/util/plancat.c4
-rw-r--r--src/backend/tcop/fastpath.c6
5 files changed, 13 insertions, 16 deletions
diff --git a/src/backend/access/common/indextuple.c b/src/backend/access/common/indextuple.c
index 77d878591d2..9a096e8930b 100644
--- a/src/backend/access/common/indextuple.c
+++ b/src/backend/access/common/indextuple.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/common/indextuple.c,v 1.39 1999/10/23 03:13:20 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/common/indextuple.c,v 1.40 2000/01/11 03:33:11 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -44,9 +44,8 @@ index_formtuple(TupleDesc tupleDescriptor,
uint16 tupmask = 0;
int numberOfAttributes = tupleDescriptor->natts;
- /* XXX shouldn't this test be '>' ? */
- if (numberOfAttributes >= INDEX_MAX_KEYS)
- elog(ERROR, "index_formtuple: numberOfAttributes %d >= %d",
+ if (numberOfAttributes > INDEX_MAX_KEYS)
+ elog(ERROR, "index_formtuple: numberOfAttributes %d > %d",
numberOfAttributes, INDEX_MAX_KEYS);
for (i = 0; i < numberOfAttributes && !hasnull; i++)
diff --git a/src/backend/commands/indexcmds.c b/src/backend/commands/indexcmds.c
index 0682cefecb9..7231cec6cc1 100644
--- a/src/backend/commands/indexcmds.c
+++ b/src/backend/commands/indexcmds.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/indexcmds.c,v 1.17 2000/01/10 17:14:32 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/indexcmds.c,v 1.18 2000/01/11 03:33:11 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -258,10 +258,10 @@ ExtendIndex(char *indexRelationName, Expr *predicate, List *rangetable)
relationId = index->indrelid;
indproc = index->indproc;
- for (i = 0; i < INDEX_MAX_KEYS; i++)
+ for (i = INDEX_MAX_KEYS-1; i >= 0; i--)
if (index->indkey[i] == InvalidAttrNumber)
break;
- numberOfAttributes = i;
+ numberOfAttributes = i+1;
if (VARSIZE(&index->indpred) != 0)
{
diff --git a/src/backend/libpq/be-pqexec.c b/src/backend/libpq/be-pqexec.c
index 8b6a880e2e1..2f32a519eae 100644
--- a/src/backend/libpq/be-pqexec.c
+++ b/src/backend/libpq/be-pqexec.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/libpq/Attic/be-pqexec.c,v 1.27 2000/01/11 02:30:06 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/libpq/Attic/be-pqexec.c,v 1.28 2000/01/11 03:33:12 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -80,8 +80,8 @@ PQfn(int fnid,
*/
retval = (char *)
fmgr(fnid, arg[0], arg[1], arg[2], arg[3],
- arg[4], arg[5], arg[6], arg[7]);
- arg[8], arg[9], arg[10], arg[11]);
+ arg[4], arg[5], arg[6], arg[7],
+ arg[8], arg[9], arg[10], arg[11],
arg[12], arg[13], arg[14], arg[15]);
/* ----------------
diff --git a/src/backend/optimizer/util/plancat.c b/src/backend/optimizer/util/plancat.c
index ef0dbfbda99..6398be2fd5f 100644
--- a/src/backend/optimizer/util/plancat.c
+++ b/src/backend/optimizer/util/plancat.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/optimizer/util/plancat.c,v 1.41 2000/01/09 00:26:40 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/optimizer/util/plancat.c,v 1.42 2000/01/11 03:33:13 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -120,10 +120,8 @@ find_secondary_indexes(Query *root, Index relid)
for (i = 0; i < INDEX_MAX_KEYS; i++)
info->indexkeys[i] = index->indkey[i];
- info->indexkeys[INDEX_MAX_KEYS] = 0;
for (i = 0; i < INDEX_MAX_KEYS; i++)
info->classlist[i] = index->indclass[i];
- info->classlist[INDEX_MAX_KEYS] = (Oid) 0;
/* Extract info from the relation descriptor for the index */
indexRelation = index_open(index->indexrelid);
diff --git a/src/backend/tcop/fastpath.c b/src/backend/tcop/fastpath.c
index 9d3ce37f72b..230babf1648 100644
--- a/src/backend/tcop/fastpath.c
+++ b/src/backend/tcop/fastpath.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/tcop/fastpath.c,v 1.34 2000/01/11 02:46:48 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/tcop/fastpath.c,v 1.35 2000/01/11 03:33:14 momjian Exp $
*
* NOTES
* This cruft is the server side of PQfn.
@@ -363,8 +363,8 @@ HandleFunctionRequest()
#ifndef NO_FASTPATH
retval = fmgr(fid,
arg[0], arg[1], arg[2], arg[3],
- arg[4], arg[5], arg[6], arg[7]);
- arg[8], arg[9], arg[10], arg[11]);
+ arg[4], arg[5], arg[6], arg[7],
+ arg[8], arg[9], arg[10], arg[11],
arg[12], arg[13], arg[14], arg[15]);
#else