aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/cache
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2003-05-13 04:38:58 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2003-05-13 04:38:58 +0000
commit1c9ac7dfd032b3e75067cf9dad1e6731e2ae0078 (patch)
tree5445325c66bf163bc4e556aa193192fb9ee9874a /src/backend/utils/cache
parent30f609484d025bfb7c69f8f6b9610dc981cb5fb8 (diff)
downloadpostgresql-1c9ac7dfd032b3e75067cf9dad1e6731e2ae0078.tar.gz
postgresql-1c9ac7dfd032b3e75067cf9dad1e6731e2ae0078.zip
Change pg_amop's index on (amopclaid,amopopr) to index (amopopr,amopclaid).
This makes no difference for existing uses, but allows SelectSortFunction() and pred_test_simple_clause() to use indexscans instead of seqscans to locate entries for a particular operator in pg_amop. Better yet, they can use the SearchSysCacheList() API to cache the search results.
Diffstat (limited to 'src/backend/utils/cache')
-rw-r--r--src/backend/utils/cache/lsyscache.c6
-rw-r--r--src/backend/utils/cache/syscache.c4
2 files changed, 5 insertions, 5 deletions
diff --git a/src/backend/utils/cache/lsyscache.c b/src/backend/utils/cache/lsyscache.c
index 49e545b6849..19178cc5243 100644
--- a/src/backend/utils/cache/lsyscache.c
+++ b/src/backend/utils/cache/lsyscache.c
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/cache/lsyscache.c,v 1.93 2003/05/09 18:08:48 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/cache/lsyscache.c,v 1.94 2003/05/13 04:38:58 tgl Exp $
*
* NOTES
* Eventually, the index information should go through here, too.
@@ -44,8 +44,8 @@ bool
op_in_opclass(Oid opno, Oid opclass)
{
return SearchSysCacheExists(AMOPOPID,
- ObjectIdGetDatum(opclass),
ObjectIdGetDatum(opno),
+ ObjectIdGetDatum(opclass),
0, 0);
}
@@ -67,8 +67,8 @@ op_requires_recheck(Oid opno, Oid opclass)
bool result;
tp = SearchSysCache(AMOPOPID,
- ObjectIdGetDatum(opclass),
ObjectIdGetDatum(opno),
+ ObjectIdGetDatum(opclass),
0, 0);
if (!HeapTupleIsValid(tp))
elog(ERROR, "op_requires_recheck: op %u is not a member of opclass %u",
diff --git a/src/backend/utils/cache/syscache.c b/src/backend/utils/cache/syscache.c
index 3eca49ba8a6..1e435f9f3ab 100644
--- a/src/backend/utils/cache/syscache.c
+++ b/src/backend/utils/cache/syscache.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/cache/syscache.c,v 1.87 2002/09/04 20:31:30 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/cache/syscache.c,v 1.88 2003/05/13 04:38:58 tgl Exp $
*
* NOTES
* These routines allow the parser/planner/executor to perform
@@ -128,8 +128,8 @@ static const struct cachedesc cacheinfo[] = {
0,
2,
{
- Anum_pg_amop_amopclaid,
Anum_pg_amop_amopopr,
+ Anum_pg_amop_amopclaid,
0,
0
}},