@@ -423,8 +423,8 @@ plpgsql_exec_function(PLpgSQL_function *func, FunctionCallInfo fcinfo,
423423/*
424424 * Let the instrumentation plugin peek at this function
425425 */
426- if (* plugin_ptr && (* plugin_ptr )-> func_beg )
427- ((* plugin_ptr )-> func_beg ) (& estate ,func );
426+ if (* plpgsql_plugin_ptr && (* plpgsql_plugin_ptr )-> func_beg )
427+ ((* plpgsql_plugin_ptr )-> func_beg ) (& estate ,func );
428428
429429/*
430430 * Now call the toplevel block of statements
@@ -556,8 +556,8 @@ plpgsql_exec_function(PLpgSQL_function *func, FunctionCallInfo fcinfo,
556556/*
557557 * Let the instrumentation plugin peek at this function
558558 */
559- if (* plugin_ptr && (* plugin_ptr )-> func_end )
560- ((* plugin_ptr )-> func_end ) (& estate ,func );
559+ if (* plpgsql_plugin_ptr && (* plpgsql_plugin_ptr )-> func_end )
560+ ((* plpgsql_plugin_ptr )-> func_end ) (& estate ,func );
561561
562562/* Clean up any leftover temporary memory */
563563plpgsql_destroy_econtext (& estate );
@@ -767,8 +767,8 @@ plpgsql_exec_trigger(PLpgSQL_function *func,
767767/*
768768 * Let the instrumentation plugin peek at this function
769769 */
770- if (* plugin_ptr && (* plugin_ptr )-> func_beg )
771- ((* plugin_ptr )-> func_beg ) (& estate ,func );
770+ if (* plpgsql_plugin_ptr && (* plpgsql_plugin_ptr )-> func_beg )
771+ ((* plpgsql_plugin_ptr )-> func_beg ) (& estate ,func );
772772
773773/*
774774 * Now call the toplevel block of statements
@@ -826,8 +826,8 @@ plpgsql_exec_trigger(PLpgSQL_function *func,
826826/*
827827 * Let the instrumentation plugin peek at this function
828828 */
829- if (* plugin_ptr && (* plugin_ptr )-> func_end )
830- ((* plugin_ptr )-> func_end ) (& estate ,func );
829+ if (* plpgsql_plugin_ptr && (* plpgsql_plugin_ptr )-> func_end )
830+ ((* plpgsql_plugin_ptr )-> func_end ) (& estate ,func );
831831
832832/* Clean up any leftover temporary memory */
833833plpgsql_destroy_econtext (& estate );
@@ -885,8 +885,8 @@ plpgsql_exec_event_trigger(PLpgSQL_function *func, EventTriggerData *trigdata)
885885/*
886886 * Let the instrumentation plugin peek at this function
887887 */
888- if (* plugin_ptr && (* plugin_ptr )-> func_beg )
889- ((* plugin_ptr )-> func_beg ) (& estate ,func );
888+ if (* plpgsql_plugin_ptr && (* plpgsql_plugin_ptr )-> func_beg )
889+ ((* plpgsql_plugin_ptr )-> func_beg ) (& estate ,func );
890890
891891/*
892892 * Now call the toplevel block of statements
@@ -909,8 +909,8 @@ plpgsql_exec_event_trigger(PLpgSQL_function *func, EventTriggerData *trigdata)
909909/*
910910 * Let the instrumentation plugin peek at this function
911911 */
912- if (* plugin_ptr && (* plugin_ptr )-> func_end )
913- ((* plugin_ptr )-> func_end ) (& estate ,func );
912+ if (* plpgsql_plugin_ptr && (* plpgsql_plugin_ptr )-> func_end )
913+ ((* plpgsql_plugin_ptr )-> func_end ) (& estate ,func );
914914
915915/* Clean up any leftover temporary memory */
916916plpgsql_destroy_econtext (& estate );
@@ -1420,8 +1420,8 @@ exec_stmt(PLpgSQL_execstate *estate, PLpgSQL_stmt *stmt)
14201420estate -> err_stmt = stmt ;
14211421
14221422/* Let the plugin know that we are about to execute this statement */
1423- if (* plugin_ptr && (* plugin_ptr )-> stmt_beg )
1424- ((* plugin_ptr )-> stmt_beg ) (estate ,stmt );
1423+ if (* plpgsql_plugin_ptr && (* plpgsql_plugin_ptr )-> stmt_beg )
1424+ ((* plpgsql_plugin_ptr )-> stmt_beg ) (estate ,stmt );
14251425
14261426CHECK_FOR_INTERRUPTS ();
14271427
@@ -1529,8 +1529,8 @@ exec_stmt(PLpgSQL_execstate *estate, PLpgSQL_stmt *stmt)
15291529}
15301530
15311531/* Let the plugin know that we have finished executing this statement */
1532- if (* plugin_ptr && (* plugin_ptr )-> stmt_end )
1533- ((* plugin_ptr )-> stmt_end ) (estate ,stmt );
1532+ if (* plpgsql_plugin_ptr && (* plpgsql_plugin_ptr )-> stmt_end )
1533+ ((* plpgsql_plugin_ptr )-> stmt_end ) (estate ,stmt );
15341534
15351535estate -> err_stmt = save_estmt ;
15361536
@@ -2315,7 +2315,7 @@ exec_stmt_foreach_a(PLpgSQL_execstate *estate, PLpgSQL_stmt_foreach_a *stmt)
23152315loop_var_elem_type = InvalidOid ;
23162316}
23172317else
2318- loop_var_elem_type = get_element_type (exec_get_datum_type (estate ,
2318+ loop_var_elem_type = get_element_type (plpgsql_exec_get_datum_type (estate ,
23192319loop_var ));
23202320
23212321/*
@@ -3350,13 +3350,13 @@ plpgsql_estate_setup(PLpgSQL_execstate *estate,
33503350 * pointers so it can call back into PL/pgSQL for doing things like
33513351 * variable assignments and stack traces
33523352 */
3353- if (* plugin_ptr )
3353+ if (* plpgsql_plugin_ptr )
33543354{
3355- (* plugin_ptr )-> error_callback = plpgsql_exec_error_callback ;
3356- (* plugin_ptr )-> assign_expr = exec_assign_expr ;
3355+ (* plpgsql_plugin_ptr )-> error_callback = plpgsql_exec_error_callback ;
3356+ (* plpgsql_plugin_ptr )-> assign_expr = exec_assign_expr ;
33573357
3358- if ((* plugin_ptr )-> func_setup )
3359- ((* plugin_ptr )-> func_setup ) (estate ,func );
3358+ if ((* plpgsql_plugin_ptr )-> func_setup )
3359+ ((* plpgsql_plugin_ptr )-> func_setup ) (estate ,func );
33603360}
33613361}
33623362
@@ -4758,15 +4758,15 @@ exec_eval_datum(PLpgSQL_execstate *estate,
47584758}
47594759
47604760/*
4761- *exec_get_datum_type Get datatype of a PLpgSQL_datum
4761+ *plpgsql_exec_get_datum_type Get datatype of a PLpgSQL_datum
47624762 *
47634763 * This is the same logic as in exec_eval_datum, except that it can handle
47644764 * some cases where exec_eval_datum has to fail; specifically, we may have
47654765 * a tupdesc but no row value for a record variable. (This currently can
47664766 * happen only for a trigger's NEW/OLD records.)
47674767 */
47684768Oid
4769- exec_get_datum_type (PLpgSQL_execstate * estate ,
4769+ plpgsql_exec_get_datum_type (PLpgSQL_execstate * estate ,
47704770PLpgSQL_datum * datum )
47714771{
47724772Oid typeid ;
@@ -4842,13 +4842,13 @@ exec_get_datum_type(PLpgSQL_execstate *estate,
48424842}
48434843
48444844/*
4845- *exec_get_datum_type_info Get datatype etc of a PLpgSQL_datum
4845+ *plpgsql_exec_get_datum_type_info Get datatype etc of a PLpgSQL_datum
48464846 *
4847- * An extended version ofexec_get_datum_type , which also retrieves the
4847+ * An extended version ofplpgsql_exec_get_datum_type , which also retrieves the
48484848 * typmod and collation of the datum.
48494849 */
48504850void
4851- exec_get_datum_type_info (PLpgSQL_execstate * estate ,
4851+ plpgsql_exec_get_datum_type_info (PLpgSQL_execstate * estate ,
48524852PLpgSQL_datum * datum ,
48534853Oid * typeid ,int32 * typmod ,Oid * collation )
48544854{