aboutsummaryrefslogtreecommitdiff
path: root/src/backend/catalog/pg_constraint.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/catalog/pg_constraint.c')
-rw-r--r--src/backend/catalog/pg_constraint.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/src/backend/catalog/pg_constraint.c b/src/backend/catalog/pg_constraint.c
index ceb4fcd4f0a..6d453538b32 100644
--- a/src/backend/catalog/pg_constraint.c
+++ b/src/backend/catalog/pg_constraint.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/catalog/pg_constraint.c,v 1.51 2010/01/02 16:57:36 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/catalog/pg_constraint.c,v 1.52 2010/02/14 18:42:13 rhaas Exp $
*
*-------------------------------------------------------------------------
*/
@@ -527,9 +527,7 @@ RemoveConstraintById(Oid conId)
conDesc = heap_open(ConstraintRelationId, RowExclusiveLock);
- tup = SearchSysCache(CONSTROID,
- ObjectIdGetDatum(conId),
- 0, 0, 0);
+ tup = SearchSysCache1(CONSTROID, ObjectIdGetDatum(conId));
if (!HeapTupleIsValid(tup)) /* should not happen */
elog(ERROR, "cache lookup failed for constraint %u", conId);
con = (Form_pg_constraint) GETSTRUCT(tup);
@@ -559,9 +557,8 @@ RemoveConstraintById(Oid conId)
Form_pg_class classForm;
pgrel = heap_open(RelationRelationId, RowExclusiveLock);
- relTup = SearchSysCacheCopy(RELOID,
- ObjectIdGetDatum(con->conrelid),
- 0, 0, 0);
+ relTup = SearchSysCacheCopy1(RELOID,
+ ObjectIdGetDatum(con->conrelid));
if (!HeapTupleIsValid(relTup))
elog(ERROR, "cache lookup failed for relation %u",
con->conrelid);
@@ -623,9 +620,7 @@ RenameConstraintById(Oid conId, const char *newname)
conDesc = heap_open(ConstraintRelationId, RowExclusiveLock);
- tuple = SearchSysCacheCopy(CONSTROID,
- ObjectIdGetDatum(conId),
- 0, 0, 0);
+ tuple = SearchSysCacheCopy1(CONSTROID, ObjectIdGetDatum(conId));
if (!HeapTupleIsValid(tuple))
elog(ERROR, "cache lookup failed for constraint %u", conId);
con = (Form_pg_constraint) GETSTRUCT(tuple);