summaryrefslogtreecommitdiff
path: root/src/backend/rewrite/rewriteSupport.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/rewrite/rewriteSupport.c')
-rw-r--r--src/backend/rewrite/rewriteSupport.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/backend/rewrite/rewriteSupport.c b/src/backend/rewrite/rewriteSupport.c
index 68735860da0..8f668f5791e 100644
--- a/src/backend/rewrite/rewriteSupport.c
+++ b/src/backend/rewrite/rewriteSupport.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/rewrite/rewriteSupport.c,v 1.68 2010/01/02 16:57:51 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/rewrite/rewriteSupport.c,v 1.69 2010/02/14 18:42:15 rhaas Exp $
*
*-------------------------------------------------------------------------
*/
@@ -28,10 +28,9 @@
bool
IsDefinedRewriteRule(Oid owningRel, const char *ruleName)
{
- return SearchSysCacheExists(RULERELNAME,
- ObjectIdGetDatum(owningRel),
- PointerGetDatum(ruleName),
- 0, 0);
+ return SearchSysCacheExists2(RULERELNAME,
+ ObjectIdGetDatum(owningRel),
+ PointerGetDatum(ruleName));
}
@@ -60,9 +59,7 @@ SetRelationRuleStatus(Oid relationId, bool relHasRules,
* Find the tuple to update in pg_class, using syscache for the lookup.
*/
relationRelation = heap_open(RelationRelationId, RowExclusiveLock);
- tuple = SearchSysCacheCopy(RELOID,
- ObjectIdGetDatum(relationId),
- 0, 0, 0);
+ tuple = SearchSysCacheCopy1(RELOID, ObjectIdGetDatum(relationId));
if (!HeapTupleIsValid(tuple))
elog(ERROR, "cache lookup failed for relation %u", relationId);
classForm = (Form_pg_class) GETSTRUCT(tuple);