1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-02 09:02:37 +03:00

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.
This commit is contained in:
Tom Lane
2002-04-06 06:59:25 +00:00
parent 707cf12f1b
commit 0332d65ac4
7 changed files with 919 additions and 369 deletions

View File

@ -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);
}