diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2002-04-06 06:59:25 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2002-04-06 06:59:25 +0000 |
commit | 0332d65ac4a1c843e1812755db1afc1b1109d0ea (patch) | |
tree | 7bf7644c1415b79c8c22d2c655af8bd605ff199f /src/backend/utils/cache/syscache.c | |
parent | 707cf12f1bd95b204c79a732db195782981959d2 (diff) | |
download | postgresql-0332d65ac4a1c843e1812755db1afc1b1109d0ea.tar.gz postgresql-0332d65ac4a1c843e1812755db1afc1b1109d0ea.zip |
Implement partial-key searching of syscaches, per recent suggestion
to pghackers. Use this to do searching for ambiguous functions ---
it will get more uses soon.
Diffstat (limited to 'src/backend/utils/cache/syscache.c')
-rw-r--r-- | src/backend/utils/cache/syscache.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/backend/utils/cache/syscache.c b/src/backend/utils/cache/syscache.c index 84cea0bb632..7e6a95a324e 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.73 2002/04/05 00:31:31 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/cache/syscache.c,v 1.74 2002/04/06 06:59:23 tgl Exp $ * * NOTES * These routines allow the parser/planner/executor to perform @@ -626,3 +626,18 @@ SysCacheGetAttr(int cacheId, HeapTuple tup, SysCache[cacheId]->cc_tupdesc, isNull); } + +/* + * List-search interface + */ +struct catclist * +SearchSysCacheList(int cacheId, int nkeys, + Datum key1, Datum key2, Datum key3, Datum key4) +{ + if (cacheId < 0 || cacheId >= SysCacheSize || + ! PointerIsValid(SysCache[cacheId])) + elog(ERROR, "SearchSysCacheList: Bad cache id %d", cacheId); + + return SearchCatCacheList(SysCache[cacheId], nkeys, + key1, key2, key3, key4); +} |