---------------------------------------------------------------- * 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. * ---------------------------------------------------------------- */
| 76 | * ---------------------------------------------------------------- |
| 77 | */ |
| 78 | ObjectAddress |
| 79 | ProcedureCreate(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 | */ |
no test coverage detected