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-2025, 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
24extern ObjectAddress DefineType(ParseState *pstate, List *names, List *parameters);
25extern void RemoveTypeById(Oid typeOid);
30extern ObjectAddress DefineCompositeType(RangeVar *typevar, List *coldeflist);
31extern Oid AssignTypeArrayOid(void);
32extern Oid AssignTypeMultirangeOid(void);
34
35extern ObjectAddress AlterDomainDefault(List *names, Node *defaultRaw);
36extern ObjectAddress AlterDomainNotNull(List *names, bool notNull);
37extern ObjectAddress AlterDomainAddConstraint(List *names, Node *newConstraint,
38 ObjectAddress *constrAddr);
39extern ObjectAddress AlterDomainValidateConstraint(List *names, const char *constrName);
40extern ObjectAddress AlterDomainDropConstraint(List *names, const char *constrName,
41 DropBehavior behavior, bool missing_ok);
42
43extern void checkDomainOwner(HeapTuple tup);
44
46
47extern ObjectAddress AlterTypeOwner(List *names, Oid newOwnerId, ObjectType objecttype);
48extern void AlterTypeOwner_oid(Oid typeOid, Oid newOwnerId, bool hasDependEntry);
49extern void AlterTypeOwnerInternal(Oid typeOid, Oid newOwnerId);
50
51extern ObjectAddress AlterTypeNamespace(List *names, const char *newschema,
52 ObjectType objecttype, Oid *oldschema);
53extern Oid AlterTypeNamespace_oid(Oid typeOid, Oid nspOid, bool ignoreDependent,
54 ObjectAddresses *objsMoved);
55extern Oid AlterTypeNamespaceInternal(Oid typeOid, Oid nspOid,
56 bool isImplicitArray,
57 bool ignoreDependent,
58 bool errorOnTableType,
59 ObjectAddresses *objsMoved);
60
62
63#endif /* TYPECMDS_H */
#define stmt
Definition: indent_codes.h:59
DropBehavior
Definition: parsenodes.h:2384
ObjectType
Definition: parsenodes.h:2311
unsigned int Oid
Definition: postgres_ext.h:32
Definition: pg_list.h:54
Definition: nodes.h:131
ObjectAddress AlterDomainNotNull(List *names, bool notNull)
Definition: typecmds.c:2731
Oid AssignTypeMultirangeOid(void)
Definition: typecmds.c:2469
Oid AlterTypeNamespace_oid(Oid typeOid, Oid nspOid, bool ignoreDependent, ObjectAddresses *objsMoved)
Definition: typecmds.c:4091
ObjectAddress DefineType(ParseState *pstate, List *names, List *parameters)
Definition: typecmds.c:152
ObjectAddress DefineEnum(CreateEnumStmt *stmt)
Definition: typecmds.c:1173
ObjectAddress AlterTypeOwner(List *names, Oid newOwnerId, ObjectType objecttype)
Definition: typecmds.c:3809
ObjectAddress AlterDomainDropConstraint(List *names, const char *constrName, DropBehavior behavior, bool missing_ok)
Definition: typecmds.c:2817
void AlterTypeOwnerInternal(Oid typeOid, Oid newOwnerId)
Definition: typecmds.c:3974
ObjectAddress AlterEnum(AlterEnumStmt *stmt)
Definition: typecmds.c:1297
ObjectAddress AlterDomainAddConstraint(List *names, Node *newConstraint, ObjectAddress *constrAddr)
Definition: typecmds.c:2923
void RemoveTypeById(Oid typeOid)
Definition: typecmds.c:657
ObjectAddress DefineDomain(ParseState *pstate, CreateDomainStmt *stmt)
Definition: typecmds.c:697
ObjectAddress AlterDomainValidateConstraint(List *names, const char *constrName)
Definition: typecmds.c:3020
ObjectAddress AlterDomainDefault(List *names, Node *defaultRaw)
Definition: typecmds.c:2602
ObjectAddress RenameType(RenameStmt *stmt)
Definition: typecmds.c:3728
Oid AssignTypeArrayOid(void)
Definition: typecmds.c:2436
void checkDomainOwner(HeapTuple tup)
Definition: typecmds.c:3473
void AlterTypeOwner_oid(Oid typeOid, Oid newOwnerId, bool hasDependEntry)
Definition: typecmds.c:3934
ObjectAddress AlterTypeNamespace(List *names, const char *newschema, ObjectType objecttype, Oid *oldschema)
Definition: typecmds.c:4042
ObjectAddress DefineCompositeType(RangeVar *typevar, List *coldeflist)
Definition: typecmds.c:2544
Oid AssignTypeMultirangeArrayOid(void)
Definition: typecmds.c:2502
ObjectAddress AlterType(AlterTypeStmt *stmt)
Definition: typecmds.c:4299
Oid AlterTypeNamespaceInternal(Oid typeOid, Oid nspOid, bool isImplicitArray, bool ignoreDependent, bool errorOnTableType, ObjectAddresses *objsMoved)
Definition: typecmds.c:4143
ObjectAddress DefineRange(ParseState *pstate, CreateRangeStmt *stmt)
Definition: typecmds.c:1372