diff options
| author | Tom Lane | 2006-12-23 00:43:13 +0000 |
|---|---|---|
| committer | Tom Lane | 2006-12-23 00:43:13 +0000 |
| commit | a78fcfb5124379532ce35f3076679f04bd987d60 (patch) | |
| tree | 345204410d4f015a9d20ff55ecc38de3d371c459 /src/backend/utils/cache/catcache.c | |
| parent | d31ccb6c3e73901c44865bfce3f5dd20774f7a89 (diff) | |
Restructure operator classes to allow improved handling of cross-data-type
cases. Operator classes now exist within "operator families". While most
families are equivalent to a single class, related classes can be grouped
into one family to represent the fact that they are semantically compatible.
Cross-type operators are now naturally adjunct parts of a family, without
having to wedge them into a particular opclass as we had done originally.
This commit restructures the catalogs and cleans up enough of the fallout so
that everything still works at least as well as before, but most of the work
needed to actually improve the planner's behavior will come later. Also,
there are not yet CREATE/DROP/ALTER OPERATOR FAMILY commands; the only way
to create a new family right now is to allow CREATE OPERATOR CLASS to make
one by default. I owe some more documentation work, too. But that can all
be done in smaller pieces once this infrastructure is in place.
Diffstat (limited to 'src/backend/utils/cache/catcache.c')
| -rw-r--r-- | src/backend/utils/cache/catcache.c | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/src/backend/utils/cache/catcache.c b/src/backend/utils/cache/catcache.c index 55b9d5baf07..1a1d19f399a 100644 --- a/src/backend/utils/cache/catcache.c +++ b/src/backend/utils/cache/catcache.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/utils/cache/catcache.c,v 1.134 2006/10/06 18:23:35 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/utils/cache/catcache.c,v 1.135 2006/12/23 00:43:11 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -1033,9 +1033,10 @@ IndexScanOK(CatCache *cache, ScanKey cur_skey) if (cache->id == INDEXRELID) { /* - * Since the OIDs of indexes aren't hardwired, it's painful to figure - * out which is which. Just force all pg_index searches to be heap - * scans while building the relcaches. + * Rather than tracking exactly which indexes have to be loaded + * before we can use indexscans (which changes from time to time), + * just force all pg_index searches to be heap scans until we've + * built the critical relcaches. */ if (!criticalRelcachesBuilt) return false; @@ -1051,17 +1052,6 @@ IndexScanOK(CatCache *cache, ScanKey cur_skey) */ return false; } - else if (cache->id == OPEROID) - { - if (!criticalRelcachesBuilt) - { - /* Looking for an OID comparison function? */ - Oid lookup_oid = DatumGetObjectId(cur_skey[0].sk_argument); - - if (lookup_oid >= MIN_OIDCMP && lookup_oid <= MAX_OIDCMP) - return false; - } - } /* Normal case, allow index scan */ return true; |
