aboutsummaryrefslogtreecommitdiff
path: root/src/backend
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2000-01-24 02:12:58 +0000
committerBruce Momjian <bruce@momjian.us>2000-01-24 02:12:58 +0000
commitda5aba105f9b4c4957203cc91bf586f8997d4d0c (patch)
tree12e2e9abf4f756a21219862b2cd17278add7f6b6 /src/backend
parent4d564c5b12a9dd36bd8f7939d268d4abe357b529 (diff)
downloadpostgresql-da5aba105f9b4c4957203cc91bf586f8997d4d0c.tar.gz
postgresql-da5aba105f9b4c4957203cc91bf586f8997d4d0c.zip
Remove Ops parameter from STATRELID cache lookup, for Tom Lane and
optimizer.
Diffstat (limited to 'src/backend')
-rw-r--r--src/backend/catalog/indexing.c21
-rw-r--r--src/backend/utils/adt/selfuncs.c4
-rw-r--r--src/backend/utils/cache/syscache.c16
3 files changed, 17 insertions, 24 deletions
diff --git a/src/backend/catalog/indexing.c b/src/backend/catalog/indexing.c
index 97e15d5d1d3..83f51eba540 100644
--- a/src/backend/catalog/indexing.c
+++ b/src/backend/catalog/indexing.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/catalog/indexing.c,v 1.56 2000/01/10 16:13:12 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/catalog/indexing.c,v 1.57 2000/01/24 02:12:54 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -64,7 +64,7 @@ char *Name_pg_rewrite_indices[Num_pg_rewrite_indices] =
char *Name_pg_shadow_indices[Num_pg_shadow_indices] =
{ShadowNameIndex, ShadowSysidIndex};
char *Name_pg_statistic_indices[Num_pg_statistic_indices] =
- {StatisticRelidAttnumOpIndex};
+ {StatisticRelidAttnumIndex};
char *Name_pg_trigger_indices[Num_pg_trigger_indices] =
{TriggerRelidIndex, TriggerConstrNameIndex, TriggerConstrRelidIndex};
char *Name_pg_type_indices[Num_pg_type_indices] =
@@ -926,13 +926,12 @@ ShadowSysidIndexScan(Relation heapRelation, int4 sysId)
HeapTuple
-StatisticRelidAttnumOpIndexScan(Relation heapRelation,
+StatisticRelidAttnumIndexScan(Relation heapRelation,
Oid relId,
- AttrNumber attNum,
- Oid op)
+ AttrNumber attNum)
{
Relation idesc;
- ScanKeyData skey[3];
+ ScanKeyData skey[2];
HeapTuple tuple;
ScanKeyEntryInitialize(&skey[0],
@@ -947,14 +946,8 @@ StatisticRelidAttnumOpIndexScan(Relation heapRelation,
(RegProcedure) F_INT2EQ,
Int16GetDatum(attNum));
- ScanKeyEntryInitialize(&skey[2],
- (bits16) 0x0,
- (AttrNumber) 3,
- (RegProcedure) F_OIDEQ,
- ObjectIdGetDatum(op));
-
- idesc = index_openr(StatisticRelidAttnumOpIndex);
- tuple = CatalogIndexFetchTuple(heapRelation, idesc, skey, 3);
+ idesc = index_openr(StatisticRelidAttnumIndex);
+ tuple = CatalogIndexFetchTuple(heapRelation, idesc, skey, 2);
index_close(idesc);
diff --git a/src/backend/utils/adt/selfuncs.c b/src/backend/utils/adt/selfuncs.c
index 5838fdc471f..c6b9520a263 100644
--- a/src/backend/utils/adt/selfuncs.c
+++ b/src/backend/utils/adt/selfuncs.c
@@ -14,7 +14,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/selfuncs.c,v 1.51 2000/01/23 03:43:23 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/selfuncs.c,v 1.52 2000/01/24 02:12:55 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -609,7 +609,7 @@ getattstatistics(Oid relid, AttrNumber attnum, Oid opid, Oid typid,
tuple = SearchSysCacheTuple(STATRELID,
ObjectIdGetDatum(relid),
Int16GetDatum((int16) attnum),
- opid,
+ 0,
0);
if (!HeapTupleIsValid(tuple))
{
diff --git a/src/backend/utils/cache/syscache.c b/src/backend/utils/cache/syscache.c
index 0d4c1e3e056..879e21c69b8 100644
--- a/src/backend/utils/cache/syscache.c
+++ b/src/backend/utils/cache/syscache.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/cache/syscache.c,v 1.45 2000/01/23 03:43:24 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/cache/syscache.c,v 1.46 2000/01/24 02:12:56 momjian Exp $
*
* NOTES
* These routines allow the parser/planner/executor to perform
@@ -54,7 +54,7 @@ typedef HeapTuple (*ScanFunc) ();
Add your new cache to the list in include/utils/syscache.h. Keep
the list sorted alphabetically and adjust the cache numbers
accordingly.
-
+
Add your entry to the cacheinfo[] array below. All cache lists are
alphabetical, so add it in the proper place. Specify the relation
name, number of arguments, argument names, size of tuple, index lookup
@@ -75,7 +75,7 @@ typedef HeapTuple (*ScanFunc) ();
Finally, any place your relation gets heap_insert() or
heap_update calls, include code to do a CatalogIndexInsert() to update
the system indexes. The heap_* calls do not update indexes.
-
+
bjm 1999/11/22
---------------------------------------------------------------------------
@@ -360,16 +360,16 @@ NULL,NULL
/* ShadowSysidIndex,
ShadowSysidIndexScan*/},
{StatisticRelationName, /* STATRELID */
- 3,
+ 2,
{
Anum_pg_statistic_starelid,
Anum_pg_statistic_staattnum,
- Anum_pg_statistic_staop,
+ 0,
0
},
offsetof(FormData_pg_statistic, stacommonval),
- StatisticRelidAttnumOpIndex,
- (ScanFunc) StatisticRelidAttnumOpIndexScan},
+ StatisticRelidAttnumIndex,
+ (ScanFunc) StatisticRelidAttnumIndexScan},
{TypeRelationName, /* TYPENAME */
1,
{
@@ -520,7 +520,7 @@ SearchSysCacheTuple(int cacheId,/* cache selection code */
get_temp_rel_by_username(DatumGetPointer(key1))) != NULL)
key1 = PointerGetDatum(nontemp_relname);
}
-
+
tp = SearchSysCache(SysCache[cacheId], key1, key2, key3, key4);
if (!HeapTupleIsValid(tp))
{