Repair ALTER EXTENSION ... SET SCHEMA.
[pgsql.git] / src / include / commands / typecmds.h
blobe1b02927c4bab5352ff85ef5e19d7186b1d90676
1 /*-------------------------------------------------------------------------
3 * typecmds.h
4 * prototypes for typecmds.c.
7 * Portions Copyright (c) 1996-2024, PostgreSQL Global Development Group
8 * Portions Copyright (c) 1994, Regents of the University of California
10 * src/include/commands/typecmds.h
12 *-------------------------------------------------------------------------
14 #ifndef TYPECMDS_H
15 #define TYPECMDS_H
17 #include "access/htup.h"
18 #include "catalog/dependency.h"
19 #include "parser/parse_node.h"
22 #define DEFAULT_TYPDELIM ','
24 extern ObjectAddress DefineType(ParseState *pstate, List *names, List *parameters);
25 extern void RemoveTypeById(Oid typeOid);
26 extern ObjectAddress DefineDomain(CreateDomainStmt *stmt);
27 extern ObjectAddress DefineEnum(CreateEnumStmt *stmt);
28 extern ObjectAddress DefineRange(ParseState *pstate, CreateRangeStmt *stmt);
29 extern ObjectAddress AlterEnum(AlterEnumStmt *stmt);
30 extern ObjectAddress DefineCompositeType(RangeVar *typevar, List *coldeflist);
31 extern Oid AssignTypeArrayOid(void);
32 extern Oid AssignTypeMultirangeOid(void);
33 extern Oid AssignTypeMultirangeArrayOid(void);
35 extern ObjectAddress AlterDomainDefault(List *names, Node *defaultRaw);
36 extern ObjectAddress AlterDomainNotNull(List *names, bool notNull);
37 extern ObjectAddress AlterDomainAddConstraint(List *names, Node *newConstraint,
38 ObjectAddress *constrAddr);
39 extern ObjectAddress AlterDomainValidateConstraint(List *names, const char *constrName);
40 extern ObjectAddress AlterDomainDropConstraint(List *names, const char *constrName,
41 DropBehavior behavior, bool missing_ok);
43 extern void checkDomainOwner(HeapTuple tup);
45 extern ObjectAddress RenameType(RenameStmt *stmt);
47 extern ObjectAddress AlterTypeOwner(List *names, Oid newOwnerId, ObjectType objecttype);
48 extern void AlterTypeOwner_oid(Oid typeOid, Oid newOwnerId, bool hasDependEntry);
49 extern void AlterTypeOwnerInternal(Oid typeOid, Oid newOwnerId);
51 extern ObjectAddress AlterTypeNamespace(List *names, const char *newschema,
52 ObjectType objecttype, Oid *oldschema);
53 extern Oid AlterTypeNamespace_oid(Oid typeOid, Oid nspOid, bool ignoreDependent,
54 ObjectAddresses *objsMoved);
55 extern Oid AlterTypeNamespaceInternal(Oid typeOid, Oid nspOid,
56 bool isImplicitArray,
57 bool ignoreDependent,
58 bool errorOnTableType,
59 ObjectAddresses *objsMoved);
61 extern ObjectAddress AlterType(AlterTypeStmt *stmt);
63 #endif /* TYPECMDS_H */