aboutsummaryrefslogtreecommitdiff
path: root/src/backend/catalog/namespace.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/catalog/namespace.c')
-rw-r--r--src/backend/catalog/namespace.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/src/backend/catalog/namespace.c b/src/backend/catalog/namespace.c
index a1ea6ed24fe..e245ae5a3e4 100644
--- a/src/backend/catalog/namespace.c
+++ b/src/backend/catalog/namespace.c
@@ -13,7 +13,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/catalog/namespace.c,v 1.2 2002/03/29 19:06:01 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/catalog/namespace.c,v 1.3 2002/03/30 01:02:41 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -81,6 +81,10 @@ RangeVarGetRelid(const RangeVar *relation, bool failOK)
* RangeVarGetCreationNamespace
* Given a RangeVar describing a to-be-created relation,
* choose which namespace to create it in.
+ *
+ * Note: calling this may result in a CommandCounterIncrement operation.
+ * That will happen on the first request for a temp table in any particular
+ * backend run; we will need to either create or clean out the temp schema.
*/
Oid
RangeVarGetCreationNamespace(const RangeVar *newRelation)
@@ -127,6 +131,21 @@ RelnameGetRelid(const char *relname)
}
/*
+ * TypenameGetTypid
+ * Try to resolve an unqualified datatype name.
+ * Returns OID if type found in search path, else InvalidOid.
+ */
+Oid
+TypenameGetTypid(const char *typname)
+{
+ /* XXX wrong, should use namespace search */
+ return GetSysCacheOid(TYPENAMENSP,
+ PointerGetDatum(typname),
+ ObjectIdGetDatum(PG_CATALOG_NAMESPACE),
+ 0, 0);
+}
+
+/*
* QualifiedNameGetCreationNamespace
* Given a possibly-qualified name for an object (in List-of-Values
* format), determine what namespace the object should be created in.