aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2012-07-21 19:39:03 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2012-07-21 19:39:03 -0400
commit1f115d98b984c80e635392aed10cc6185d1f8f4b (patch)
treef85b6937afcfd32b05aec1020fcd9a21292c85e3 /src
parent31c7c642b6419b43eff903285e3da65e3f1901d6 (diff)
downloadpostgresql-1f115d98b984c80e635392aed10cc6185d1f8f4b.tar.gz
postgresql-1f115d98b984c80e635392aed10cc6185d1f8f4b.zip
Suppress volatile-related warning seen in some compilers.
Antique versions of gcc complain about vars that are initialized outside PG_TRY and then modified within it. Rather than marking the var volatile, expend one more line of code.
Diffstat (limited to 'src')
-rw-r--r--src/pl/plpgsql/src/pl_handler.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/pl/plpgsql/src/pl_handler.c b/src/pl/plpgsql/src/pl_handler.c
index 905fff0b31d..63c3abd9b0b 100644
--- a/src/pl/plpgsql/src/pl_handler.c
+++ b/src/pl/plpgsql/src/pl_handler.c
@@ -91,7 +91,7 @@ plpgsql_call_handler(PG_FUNCTION_ARGS)
{
PLpgSQL_function *func;
PLpgSQL_execstate *save_cur_estate;
- Datum retval = 0; /* make compiler happy */
+ Datum retval;
int rc;
/*
@@ -119,8 +119,11 @@ plpgsql_call_handler(PG_FUNCTION_ARGS)
retval = PointerGetDatum(plpgsql_exec_trigger(func,
(TriggerData *) fcinfo->context));
else if (CALLED_AS_EVENT_TRIGGER(fcinfo))
+ {
plpgsql_exec_event_trigger(func,
(EventTriggerData *) fcinfo->context);
+ retval = (Datum) 0;
+ }
else
retval = plpgsql_exec_function(func, fcinfo);
}