1
0
mirror of https://github.com/postgres/postgres.git synced 2025-12-21 05:21:08 +03:00

Replace SearchSysCacheGetAttribute with SysCacheGetAttr, which fetches

an attribute of a tuple previously fetched with SearchSysCacheTuple.
This avoids a lot of redundant cache lookups, particularly in selfuncs.c.
Also, remove SearchSysCacheStruct, which was unused and grotty.
This commit is contained in:
Tom Lane
2000-01-23 03:43:24 +00:00
parent 1161077e97
commit 27fee810ff
5 changed files with 110 additions and 243 deletions

View File

@@ -8,7 +8,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: syscache.h,v 1.22 1999/11/24 16:52:50 momjian Exp $
* $Id: syscache.h,v 1.23 2000/01/23 03:43:22 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -81,10 +81,8 @@ extern HeapTuple SearchSysCacheTupleCopy(int cacheId,
Datum key1, Datum key2, Datum key3, Datum key4);
extern HeapTuple SearchSysCacheTuple(int cacheId,
Datum key1, Datum key2, Datum key3, Datum key4);
extern int32 SearchSysCacheStruct(int cacheId, char *returnStruct,
Datum key1, Datum key2, Datum key3, Datum key4);
extern void *SearchSysCacheGetAttribute(int cacheId,
AttrNumber attributeNumber,
Datum key1, Datum key2, Datum key3, Datum key4);
extern Datum SysCacheGetAttr(int cacheId, HeapTuple tup,
AttrNumber attributeNumber,
bool *isnull);
#endif /* SYSCACHE_H */