mirror of
https://github.com/postgres/postgres.git
synced 2025-06-30 21:42:05 +03:00
Wrap calls to SearchSysCache and related functions using macros.
The purpose of this change is to eliminate the need for every caller of SearchSysCache, SearchSysCacheCopy, SearchSysCacheExists, GetSysCacheOid, and SearchSysCacheList to know the maximum number of allowable keys for a syscache entry (currently 4). This will make it far easier to increase the maximum number of keys in a future release should we choose to do so, and it makes the code shorter, too. Design and review by Tom Lane.
This commit is contained in:
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/tcop/fastpath.c,v 1.102 2010/01/02 16:57:52 momjian Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/tcop/fastpath.c,v 1.103 2010/02/14 18:42:15 rhaas Exp $
|
||||
*
|
||||
* NOTES
|
||||
* This cruft is the server side of PQfn.
|
||||
@ -214,9 +214,7 @@ fetch_fp_info(Oid func_id, struct fp_info * fip)
|
||||
|
||||
fmgr_info(func_id, &fip->flinfo);
|
||||
|
||||
func_htp = SearchSysCache(PROCOID,
|
||||
ObjectIdGetDatum(func_id),
|
||||
0, 0, 0);
|
||||
func_htp = SearchSysCache1(PROCOID, ObjectIdGetDatum(func_id));
|
||||
if (!HeapTupleIsValid(func_htp))
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_UNDEFINED_FUNCTION),
|
||||
|
Reference in New Issue
Block a user