index d58313a2ee073036311e1a1583c57981ce911799..723355ac898d77bf2657234ade5b890c2fb0c8a7 100644 (file)
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/catalog/namespace.c,v 1.44 2003年01月10日 22:03:27 petere Exp $
+ * $Header: /cvsroot/pgsql/src/backend/catalog/namespace.c,v 1.45 2003年01月12日 18:19:37 petere Exp $
*
*-------------------------------------------------------------------------
*/
return InvalidOid;
}
-/*
- * RelidGetNamespaceId
- * Given a relation OID, return the namespace OID.
- */
-Oid
-RelidGetNamespaceId(Oid relid)
-{
- HeapTuple tuple;
- Form_pg_class pg_class_form;
- Oid result;
-
- tuple = SearchSysCache(RELOID,
- ObjectIdGetDatum(relid),
- 0, 0, 0);
- if (!HeapTupleIsValid(tuple))
- elog(ERROR, "cache lookup failed for relation %u", relid);
- pg_class_form = (Form_pg_class) GETSTRUCT(tuple);
-
- result = pg_class_form->relnamespace;
- ReleaseSysCache(tuple);
- return result;
-}
-
/*
* RelationIsVisible
index a1a8134a6a713002d548b960837a5654f213dc1c..04aed372c004e856aae44576f1373d33e080b65f 100644 (file)
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.197 2003年01月10日 22:03:27 petere Exp $
+ * $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.198 2003年01月12日 18:19:37 petere Exp $
*
*-------------------------------------------------------------------------
*/
@@ -419,7 +419,7 @@ ExecCheckXactReadOnly(Query *parsetree, CmdType operation)
if (!rte->checkForWrite)
continue;
- if (isTempNamespace(RelidGetNamespaceId(rte->relid)))
+ if (isTempNamespace(get_rel_namespace(rte->relid)))
continue;
goto fail;
index efd5ae3278671cd614923ec9c8491c29c6e2e5df..6e9522bcd96c9a6acb3b22f0dbed987cbb11cea0 100644 (file)
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: namespace.h,v 1.25 2003年01月10日 22:03:30 petere Exp $
+ * $Id: namespace.h,v 1.26 2003年01月12日 18:19:37 petere Exp $
*
*-------------------------------------------------------------------------
*/
@@ -51,7 +51,6 @@ typedef struct _OpclassCandidateList
extern Oid RangeVarGetRelid(const RangeVar *relation, bool failOK);
extern Oid RangeVarGetCreationNamespace(const RangeVar *newRelation);
extern Oid RelnameGetRelid(const char *relname);
-extern Oid RelidGetNamespaceId(Oid relid);
extern bool RelationIsVisible(Oid relid);
extern Oid TypenameGetTypid(const char *typname);