44{
48 bool nulls[Natts_pg_namespace];
55
56
57 if (!nspName)
58 elog(
ERROR,
"no namespace name supplied");
59
60
63 (
errcode(ERRCODE_DUPLICATE_SCHEMA),
64 errmsg(
"schema \"%s\" already exists", nspName)));
65
66 if (!isTemp)
69 else
70 nspacl = NULL;
71
74
75
76 for (
i = 0;
i < Natts_pg_namespace;
i++)
77 {
80 }
81
83 Anum_pg_namespace_oid);
88 if (nspacl != NULL)
90 else
91 nulls[Anum_pg_namespace_nspacl - 1] = true;
92
93
95
98
100
101
102 myself.
classId = NamespaceRelationId;
105
106
108
109
111
112
113 if (!isTemp)
115
116
118
119 return nspoid;
120}
void recordDependencyOnNewAcl(Oid classId, Oid objectId, int32 objsubId, Oid ownerId, Acl *acl)
Acl * get_user_default_acl(ObjectType objtype, Oid ownerId, Oid nsp_oid)
static Datum values[MAXATTR]
#define Assert(condition)
#define OidIsValid(objectId)
Oid GetNewOidWithIndex(Relation relation, Oid indexId, AttrNumber oidcolumn)
int errcode(int sqlerrcode)
int errmsg(const char *fmt,...)
#define ereport(elevel,...)
HeapTuple heap_form_tuple(TupleDesc tupleDescriptor, const Datum *values, const bool *isnull)
void CatalogTupleInsert(Relation heapRel, HeapTuple tup)
void namestrcpy(Name name, const char *str)
#define InvokeObjectPostCreateHook(classId, objectId, subId)
void recordDependencyOnCurrentExtension(const ObjectAddress *object, bool isReplace)
void recordDependencyOnOwner(Oid classId, Oid objectId, Oid owner)
static Datum PointerGetDatum(const void *X)
static Datum ObjectIdGetDatum(Oid X)
static Datum NameGetDatum(const NameData *X)
#define SearchSysCacheExists1(cacheId, key1)
void table_close(Relation relation, LOCKMODE lockmode)
Relation table_open(Oid relationId, LOCKMODE lockmode)