diff options
Diffstat (limited to 'src/backend/parser/parse_utilcmd.c')
-rw-r--r-- | src/backend/parser/parse_utilcmd.c | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/src/backend/parser/parse_utilcmd.c b/src/backend/parser/parse_utilcmd.c index f2b29d327c7..4a5a5725455 100644 --- a/src/backend/parser/parse_utilcmd.c +++ b/src/backend/parser/parse_utilcmd.c @@ -19,7 +19,7 @@ * Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/backend/parser/parse_utilcmd.c,v 2.38 2010/02/03 05:46:37 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/parser/parse_utilcmd.c,v 2.39 2010/02/14 18:42:15 rhaas Exp $ * *------------------------------------------------------------------------- */ @@ -889,9 +889,7 @@ generateClonedIndexStmt(CreateStmtContext *cxt, Relation source_idx, * Fetch pg_class tuple of source index. We can't use the copy in the * relcache entry because it doesn't include optional fields. */ - ht_idxrel = SearchSysCache(RELOID, - ObjectIdGetDatum(source_relid), - 0, 0, 0); + ht_idxrel = SearchSysCache1(RELOID, ObjectIdGetDatum(source_relid)); if (!HeapTupleIsValid(ht_idxrel)) elog(ERROR, "cache lookup failed for relation %u", source_relid); idxrelrec = (Form_pg_class) GETSTRUCT(ht_idxrel); @@ -943,9 +941,8 @@ generateClonedIndexStmt(CreateStmtContext *cxt, Relation source_idx, HeapTuple ht_constr; Form_pg_constraint conrec; - ht_constr = SearchSysCache(CONSTROID, - ObjectIdGetDatum(constraintId), - 0, 0, 0); + ht_constr = SearchSysCache1(CONSTROID, + ObjectIdGetDatum(constraintId)); if (!HeapTupleIsValid(ht_constr)) elog(ERROR, "cache lookup failed for constraint %u", constraintId); @@ -984,9 +981,8 @@ generateClonedIndexStmt(CreateStmtContext *cxt, Relation source_idx, char *nspname; List *namelist; - opertup = SearchSysCache(OPEROID, - ObjectIdGetDatum(operid), - 0, 0, 0); + opertup = SearchSysCache1(OPEROID, + ObjectIdGetDatum(operid)); if (!HeapTupleIsValid(opertup)) elog(ERROR, "cache lookup failed for operator %u", operid); @@ -1138,9 +1134,7 @@ get_opclass(Oid opclass, Oid actual_datatype) Form_pg_opclass opc_rec; List *result = NIL; - ht_opc = SearchSysCache(CLAOID, - ObjectIdGetDatum(opclass), - 0, 0, 0); + ht_opc = SearchSysCache1(CLAOID, ObjectIdGetDatum(opclass)); if (!HeapTupleIsValid(ht_opc)) elog(ERROR, "cache lookup failed for opclass %u", opclass); opc_rec = (Form_pg_opclass) GETSTRUCT(ht_opc); |