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

Function plsample_call_handler

src/test/modules/plsample/plsample.c:36–75  ·  view source on GitHub ↗

* Handle function, procedure, and trigger calls. */

Source from the content-addressed store, hash-verified

34 * Handle function, procedure, and trigger calls.
35 */
36Datum
37plsample_call_handler(PG_FUNCTION_ARGS)
38{
39 Datum retval = (Datum) 0;
40
41 PG_TRY();
42 {
43 /*
44 * Determine if called as function or trigger and call appropriate
45 * subhandler.
46 */
47 if (CALLED_AS_TRIGGER(fcinfo))
48 {
49 /*
50 * This function has been called as a trigger function, where
51 * (TriggerData *) fcinfo->context includes the information of the
52 * context.
53 */
54 }
55 else if (CALLED_AS_EVENT_TRIGGER(fcinfo))
56 {
57 /*
58 * This function is called as an event trigger function, where
59 * (EventTriggerData *) fcinfo->context includes the information
60 * of the context.
61 */
62 }
63 else
64 {
65 /* Regular function handler */
66 retval = plsample_func_handler(fcinfo);
67 }
68 }
69 PG_FINALLY();
70 {
71 }
72 PG_END_TRY();
73
74 return retval;
75}
76
77/*
78 * plsample_func_handler

Callers

nothing calls this directly

Calls 1

plsample_func_handlerFunction · 0.85

Tested by

no test coverage detected