1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-24 00:23:06 +03:00

Second round of fmgr changes: triggers are now invoked in new style,

CurrentTriggerData is history.
This commit is contained in:
Tom Lane
2000-05-29 01:59:17 +00:00
parent 147ccf5c80
commit 18952f6744
41 changed files with 666 additions and 674 deletions

View File

@@ -31,7 +31,7 @@
* ENHANCEMENTS, OR MODIFICATIONS.
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/pl/tcl/pltcl.c,v 1.23 2000/05/28 17:56:29 tgl Exp $
* $Header: /cvsroot/pgsql/src/pl/tcl/pltcl.c,v 1.24 2000/05/29 01:59:15 tgl Exp $
*
**********************************************************************/
@@ -390,10 +390,10 @@ pltcl_call_handler(PG_FUNCTION_ARGS)
* Determine if called as function or trigger and
* call appropriate subhandler
************************************************************/
if (CurrentTriggerData == NULL)
retval = pltcl_func_handler(fcinfo);
if (CALLED_AS_TRIGGER(fcinfo))
retval = PointerGetDatum(pltcl_trigger_handler(fcinfo));
else
retval = (Datum) pltcl_trigger_handler(fcinfo);
retval = pltcl_func_handler(fcinfo);
pltcl_call_level--;
@@ -734,7 +734,7 @@ pltcl_func_handler(PG_FUNCTION_ARGS)
static HeapTuple
pltcl_trigger_handler(PG_FUNCTION_ARGS)
{
TriggerData *trigdata;
TriggerData *trigdata = (TriggerData *) fcinfo->context;
char internal_proname[512];
char *stroid;
Tcl_HashEntry *hashent;
@@ -757,12 +757,6 @@ pltcl_trigger_handler(PG_FUNCTION_ARGS)
sigjmp_buf save_restart;
/************************************************************
* Save the current trigger data local
************************************************************/
trigdata = CurrentTriggerData;
CurrentTriggerData = NULL;
/************************************************************
* Build our internal proc name from the functions Oid
************************************************************/