summaryrefslogtreecommitdiffstats
path: root/src/include/commands/typecmds.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/commands/typecmds.h')
-rw-r--r--src/include/commands/typecmds.h59
1 files changed, 59 insertions, 0 deletions
diff --git a/src/include/commands/typecmds.h b/src/include/commands/typecmds.h
new file mode 100644
index 0000000..2313089
--- /dev/null
+++ b/src/include/commands/typecmds.h
@@ -0,0 +1,59 @@
+/*-------------------------------------------------------------------------
+ *
+ * typecmds.h
+ * prototypes for typecmds.c.
+ *
+ *
+ * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group
+ * Portions Copyright (c) 1994, Regents of the University of California
+ *
+ * src/include/commands/typecmds.h
+ *
+ *-------------------------------------------------------------------------
+ */
+#ifndef TYPECMDS_H
+#define TYPECMDS_H
+
+#include "access/htup.h"
+#include "catalog/dependency.h"
+#include "parser/parse_node.h"
+
+
+#define DEFAULT_TYPDELIM ','
+
+extern ObjectAddress DefineType(ParseState *pstate, List *names, List *parameters);
+extern void RemoveTypeById(Oid typeOid);
+extern ObjectAddress DefineDomain(CreateDomainStmt *stmt);
+extern ObjectAddress DefineEnum(CreateEnumStmt *stmt);
+extern ObjectAddress DefineRange(CreateRangeStmt *stmt);
+extern ObjectAddress AlterEnum(AlterEnumStmt *stmt);
+extern ObjectAddress DefineCompositeType(RangeVar *typevar, List *coldeflist);
+extern Oid AssignTypeArrayOid(void);
+
+extern ObjectAddress AlterDomainDefault(List *names, Node *defaultRaw);
+extern ObjectAddress AlterDomainNotNull(List *names, bool notNull);
+extern ObjectAddress AlterDomainAddConstraint(List *names, Node *constr,
+ ObjectAddress *constrAddr);
+extern ObjectAddress AlterDomainValidateConstraint(List *names, const char *constrName);
+extern ObjectAddress AlterDomainDropConstraint(List *names, const char *constrName,
+ DropBehavior behavior, bool missing_ok);
+
+extern void checkDomainOwner(HeapTuple tup);
+
+extern ObjectAddress RenameType(RenameStmt *stmt);
+
+extern ObjectAddress AlterTypeOwner(List *names, Oid newOwnerId, ObjectType objecttype);
+extern void AlterTypeOwner_oid(Oid typeOid, Oid newOwnerId, bool hasDependEntry);
+extern void AlterTypeOwnerInternal(Oid typeOid, Oid newOwnerId);
+
+extern ObjectAddress AlterTypeNamespace(List *names, const char *newschema,
+ ObjectType objecttype, Oid *oldschema);
+extern Oid AlterTypeNamespace_oid(Oid typeOid, Oid nspOid, ObjectAddresses *objsMoved);
+extern Oid AlterTypeNamespaceInternal(Oid typeOid, Oid nspOid,
+ bool isImplicitArray,
+ bool errorOnTableType,
+ ObjectAddresses *objsMoved);
+
+extern ObjectAddress AlterType(AlterTypeStmt *stmt);
+
+#endif /* TYPECMDS_H */