189{
197 bool callit;
198 bool was_logged = false;
199 char msec_str[32];
200
201
202
203
204
207 (
errcode(ERRCODE_IN_FAILED_SQL_TRANSACTION),
208 errmsg(
"current transaction is aborted, "
209 "commands ignored until end of transaction block")));
210
211
212
213
214
216
217
218
219
221
222
223
224
225
226 fip = &my_fp;
228
229
231 {
233 (
errmsg(
"fastpath function call: \"%s\" (OID %u)",
235 was_logged = true;
236 }
237
238
239
240
241
247
253
254
255
256
257
258
259
260
262
264
265
267
268
269
270
271 callit = true;
273 {
275
276 for (
i = 0;
i < fcinfo->nargs;
i++)
277 {
278 if (fcinfo->args[
i].isnull)
279 {
280 callit = false;
281 break;
282 }
283 }
284 }
285
286 if (callit)
287 {
288
290 }
291 else
292 {
293 fcinfo->isnull = true;
295 }
296
297
299
301
302
304
305
306
307
309 {
310 case 1:
312 (
errmsg(
"duration: %s ms", msec_str)));
313 break;
314 case 2:
316 (
errmsg(
"duration: %s ms fastpath function call: \"%s\" (OID %u)",
317 msec_str, fip->
fname, fid)));
318 break;
319 }
320}
void aclcheck_error(AclResult aclerr, ObjectType objtype, const char *objectname)
AclResult object_aclcheck(Oid classid, Oid objectid, Oid roleid, AclMode mode)
int errcode(int sqlerrcode)
int errmsg(const char *fmt,...)
#define ereport(elevel,...)
static void fetch_fp_info(Oid func_id, struct fp_info *fip)
static int16 parse_fcall_arguments(StringInfo msgBuf, struct fp_info *fip, FunctionCallInfo fcinfo)
static void SendFunctionResult(Datum retval, bool isnull, Oid rettype, int16 format)
#define InitFunctionCallInfoData(Fcinfo, Flinfo, Nargs, Collation, Context, Resultinfo)
#define LOCAL_FCINFO(name, nargs)
#define FunctionCallInvoke(fcinfo)
char * get_func_name(Oid funcid)
char * get_namespace_name(Oid nspid)
#define CHECK_FOR_INTERRUPTS()
#define InvokeNamespaceSearchHook(objectId, ereport_on_violation)
#define InvokeFunctionExecuteHook(objectId)
int check_log_duration(char *msec_str, bool was_logged)
Snapshot GetTransactionSnapshot(void)
void PushActiveSnapshot(Snapshot snapshot)
void PopActiveSnapshot(void)
bool IsAbortedTransactionBlockState(void)