PostgreSQL Source Code  git master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
pg_type_fn.h
Go to the documentation of this file.
1 /*-------------------------------------------------------------------------
2  *
3  * pg_type_fn.h
4  * prototypes for functions in catalog/pg_type.c
5  *
6  *
7  * Portions Copyright (c) 1996-2017, PostgreSQL Global Development Group
8  * Portions Copyright (c) 1994, Regents of the University of California
9  *
10  * src/include/catalog/pg_type_fn.h
11  *
12  *-------------------------------------------------------------------------
13  */
14 #ifndef PG_TYPE_FN_H
15 #define PG_TYPE_FN_H
16 
17 #include "catalog/objectaddress.h"
18 #include "nodes/nodes.h"
19 
20 
21 extern ObjectAddress TypeShellMake(const char *typeName,
22  Oid typeNamespace,
23  Oid ownerId);
24 
25 extern ObjectAddress TypeCreate(Oid newTypeOid,
26  const char *typeName,
27  Oid typeNamespace,
28  Oid relationOid,
29  char relationKind,
30  Oid ownerId,
31  int16 internalSize,
32  char typeType,
33  char typeCategory,
34  bool typePreferred,
35  char typDelim,
36  Oid inputProcedure,
37  Oid outputProcedure,
38  Oid receiveProcedure,
39  Oid sendProcedure,
40  Oid typmodinProcedure,
41  Oid typmodoutProcedure,
42  Oid analyzeProcedure,
43  Oid elementType,
44  bool isImplicitArray,
45  Oid arrayType,
46  Oid baseType,
47  const char *defaultTypeValue,
48  char *defaultTypeBin,
49  bool passedByValue,
50  char alignment,
51  char storage,
52  int32 typeMod,
53  int32 typNDims,
54  bool typeNotNull,
55  Oid typeCollation);
56 
57 extern void GenerateTypeDependencies(Oid typeNamespace,
58  Oid typeObjectId,
59  Oid relationOid,
60  char relationKind,
61  Oid owner,
62  Oid inputProcedure,
63  Oid outputProcedure,
64  Oid receiveProcedure,
65  Oid sendProcedure,
66  Oid typmodinProcedure,
67  Oid typmodoutProcedure,
68  Oid analyzeProcedure,
69  Oid elementType,
70  bool isImplicitArray,
71  Oid baseType,
72  Oid typeCollation,
73  Node *defaultExpr,
74  bool rebuild);
75 
76 extern void RenameTypeInternal(Oid typeOid, const char *newTypeName,
77  Oid typeNamespace);
78 
79 extern char *makeArrayTypeName(const char *typeName, Oid typeNamespace);
80 
81 extern bool moveArrayTypeName(Oid typeOid, const char *typeName,
82  Oid typeNamespace);
83 
84 #endif /* PG_TYPE_FN_H */
ObjectAddress TypeCreate(Oid newTypeOid, const char *typeName, Oid typeNamespace, Oid relationOid, char relationKind, Oid ownerId, int16 internalSize, char typeType, char typeCategory, bool typePreferred, char typDelim, Oid inputProcedure, Oid outputProcedure, Oid receiveProcedure, Oid sendProcedure, Oid typmodinProcedure, Oid typmodoutProcedure, Oid analyzeProcedure, Oid elementType, bool isImplicitArray, Oid arrayType, Oid baseType, const char *defaultTypeValue, char *defaultTypeBin, bool passedByValue, char alignment, char storage, int32 typeMod, int32 typNDims, bool typeNotNull, Oid typeCollation)
Definition: pg_type.c:195
signed short int16
Definition: c.h:252
bool moveArrayTypeName(Oid typeOid, const char *typeName, Oid typeNamespace)
Definition: pg_type.c:813
Definition: nodes.h:508
unsigned int Oid
Definition: postgres_ext.h:31
signed int int32
Definition: c.h:253
ObjectAddress TypeShellMake(const char *typeName, Oid typeNamespace, Oid ownerId)
Definition: pg_type.c:56
void GenerateTypeDependencies(Oid typeNamespace, Oid typeObjectId, Oid relationOid, char relationKind, Oid owner, Oid inputProcedure, Oid outputProcedure, Oid receiveProcedure, Oid sendProcedure, Oid typmodinProcedure, Oid typmodoutProcedure, Oid analyzeProcedure, Oid elementType, bool isImplicitArray, Oid baseType, Oid typeCollation, Node *defaultExpr, bool rebuild)
Definition: pg_type.c:512
char * makeArrayTypeName(const char *typeName, Oid typeNamespace)
Definition: pg_type.c:747
void RenameTypeInternal(Oid typeOid, const char *newTypeName, Oid typeNamespace)
Definition: pg_type.c:692