PostgreSQL Source Code  git master
typecmds.h
Go to the documentation of this file.
1 /*-------------------------------------------------------------------------
2  *
3  * typecmds.h
4  * prototypes for typecmds.c.
5  *
6  *
7  * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
8  * Portions Copyright (c) 1994, Regents of the University of California
9  *
10  * src/include/commands/typecmds.h
11  *
12  *-------------------------------------------------------------------------
13  */
14 #ifndef TYPECMDS_H
15 #define TYPECMDS_H
16 
17 #include "access/htup.h"
18 #include "catalog/dependency.h"
19 #include "parser/parse_node.h"
20 
21 
22 #define DEFAULT_TYPDELIM ','
23 
24 extern ObjectAddress DefineType(ParseState *pstate, List *names, List *parameters);
25 extern void RemoveTypeById(Oid typeOid);
30 extern ObjectAddress DefineCompositeType(RangeVar *typevar, List *coldeflist);
31 extern Oid AssignTypeArrayOid(void);
32 extern Oid AssignTypeMultirangeOid(void);
34 
35 extern ObjectAddress AlterDomainDefault(List *names, Node *defaultRaw);
36 extern ObjectAddress AlterDomainNotNull(List *names, bool notNull);
37 extern ObjectAddress AlterDomainAddConstraint(List *names, Node *constr,
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);
42 
43 extern void checkDomainOwner(HeapTuple tup);
44 
45 extern ObjectAddress RenameType(RenameStmt *stmt);
46 
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);
50 
51 extern ObjectAddress AlterTypeNamespace(List *names, const char *newschema,
52  ObjectType objecttype, Oid *oldschema);
53 extern Oid AlterTypeNamespace_oid(Oid typeOid, Oid nspOid, ObjectAddresses *objsMoved);
54 extern Oid AlterTypeNamespaceInternal(Oid typeOid, Oid nspOid,
55  bool isImplicitArray,
56  bool errorOnTableType,
57  ObjectAddresses *objsMoved);
58 
60 
61 #endif /* TYPECMDS_H */
ObjectAddress AlterDomainDropConstraint(List *names, const char *constrName, DropBehavior behavior, bool missing_ok)
Definition: typecmds.c:2834
ObjectAddress AlterDomainAddConstraint(List *names, Node *constr, ObjectAddress *constrAddr)
Definition: typecmds.c:2933
Oid AlterTypeNamespaceInternal(Oid typeOid, Oid nspOid, bool isImplicitArray, bool errorOnTableType, ObjectAddresses *objsMoved)
Definition: typecmds.c:3970
Definition: nodes.h:539
ObjectAddress AlterTypeNamespace(List *names, const char *newschema, ObjectType objecttype, Oid *oldschema)
Definition: typecmds.c:3895
unsigned int Oid
Definition: postgres_ext.h:31
void checkDomainOwner(HeapTuple tup)
Definition: typecmds.c:3440
ObjectAddress AlterType(AlterTypeStmt *stmt)
Definition: typecmds.c:4113
ObjectAddress AlterDomainDefault(List *names, Node *defaultRaw)
Definition: typecmds.c:2583
void RemoveTypeById(Oid typeOid)
Definition: typecmds.c:656
Oid AssignTypeMultirangeOid(void)
Definition: typecmds.c:2450
void AlterTypeOwner_oid(Oid typeOid, Oid newOwnerId, bool hasDependEntry)
Definition: typecmds.c:3800
ObjectAddress DefineType(ParseState *pstate, List *names, List *parameters)
Definition: typecmds.c:148
ObjectType
Definition: parsenodes.h:1775
DropBehavior
Definition: parsenodes.h:1846
ObjectAddress DefineEnum(CreateEnumStmt *stmt)
Definition: typecmds.c:1140
ObjectAddress AlterEnum(AlterEnumStmt *stmt)
Definition: typecmds.c:1264
ObjectAddress DefineDomain(CreateDomainStmt *stmt)
Definition: typecmds.c:696
Oid AssignTypeArrayOid(void)
Definition: typecmds.c:2417
ObjectAddress DefineCompositeType(RangeVar *typevar, List *coldeflist)
Definition: typecmds.c:2525
void AlterTypeOwnerInternal(Oid typeOid, Oid newOwnerId)
Definition: typecmds.c:3840
Oid AssignTypeMultirangeArrayOid(void)
Definition: typecmds.c:2483
ObjectAddress DefineRange(CreateRangeStmt *stmt)
Definition: typecmds.c:1339
ObjectAddress AlterDomainValidateConstraint(List *names, const char *constrName)
Definition: typecmds.c:3049
ObjectAddress AlterTypeOwner(List *names, Oid newOwnerId, ObjectType objecttype)
Definition: typecmds.c:3692
Oid AlterTypeNamespace_oid(Oid typeOid, Oid nspOid, ObjectAddresses *objsMoved)
Definition: typecmds.c:3932
Definition: pg_list.h:50
ObjectAddress RenameType(RenameStmt *stmt)
Definition: typecmds.c:3615
ObjectAddress AlterDomainNotNull(List *names, bool notNull)
Definition: typecmds.c:2714