MCPcopy Create free account
hub / github.com/apache/cloudberry / ProcedureCreate

Function ProcedureCreate

src/backend/catalog/pg_proc.c:78–788  ·  view source on GitHub ↗

---------------------------------------------------------------- * ProcedureCreate * * Note: allParameterTypes, parameterModes, parameterNames, trftypes, and proconfig * are either arrays of the proper types or NULL. We declare them Datum, * not "ArrayType *", to avoid importing array.h into pg_proc.h. * ---------------------------------------------------------------- */

Source from the content-addressed store, hash-verified

76 * ----------------------------------------------------------------
77 */
78ObjectAddress
79ProcedureCreate(const char *procedureName,
80 Oid procNamespace,
81 bool replace,
82 bool returnsSet,
83 Oid returnType,
84 Oid proowner,
85 Oid languageObjectId,
86 Oid languageValidator,
87 Oid describeFuncOid,
88 const char *prosrc,
89 const char *probin,
90 Node *prosqlbody,
91 char prokind,
92 bool security_definer,
93 bool isLeakProof,
94 bool isStrict,
95 char volatility,
96 char parallel,
97 oidvector *parameterTypes,
98 Datum allParameterTypes,
99 Datum parameterModes,
100 Datum parameterNames,
101 List *parameterDefaults,
102 Datum trftypes,
103 Datum proconfig,
104 Oid prosupport,
105 float4 procost,
106 float4 prorows,
107 char prodataaccess,
108 char proexeclocation)
109{
110 Oid retval;
111 int parameterCount;
112 int allParamCount;
113 Oid *allParams;
114 char *paramModes = NULL;
115 Oid variadicType = InvalidOid;
116 Acl *proacl = NULL;
117 Relation rel;
118 HeapTuple tup;
119 HeapTuple oldtup;
120 bool nulls[Natts_pg_proc];
121 Datum values[Natts_pg_proc];
122 bool replaces[Natts_pg_proc];
123 NameData procname;
124 TupleDesc tupDesc;
125 bool is_update;
126 ObjectAddress myself,
127 referenced;
128 char *detailmsg;
129 int i;
130 Oid trfid;
131 ObjectAddresses *addrs;
132
133 /*
134 * sanity checks
135 */

Callers 4

makeRangeConstructorsFunction · 0.85
CreateFunctionFunction · 0.85
AggregateCreateFunction · 0.85

Calls 15

get_element_typeFunction · 0.85
namestrcpyFunction · 0.85
NameGetDatumFunction · 0.85
ObjectIdGetDatumFunction · 0.85
Float4GetDatumFunction · 0.85
CharGetDatumFunction · 0.85
BoolGetDatumFunction · 0.85
UInt16GetDatumFunction · 0.85
list_lengthFunction · 0.85
nodeToStringFunction · 0.85

Tested by

no test coverage detected