From: Tom Lane <tgl@sss.pgh.pa.us>
To: Steven Bradley <sbradley@llnl.gov>
Cc: pgsql-interfaces@hub.org
Subject: Re: triggers and NOTIFY
Date: Sat, 03 Jul 1999 21:20:45 -0400
Message-ID: <17308.931051245@sss.pgh.pa.us> (raw)
Steven Bradley <sbradley@llnl.gov> writes:
> When the trigger simply
> issues the NOTIFY, the front-end process recieves the notification just
> fine. However, when I also try to INSERT a record into table B from within
> the trigger (either before or after issuing the NOTIFY), the record gets
> inserted into table B, but the front-end application does not recieve a
> notification.
What version are you using? The test case you gave causes a repeatable
core dump in 6.5 for me, so it was pretty easy to find the cause.
I have committed a fix for 6.5.1, but if you are in a hurry:
inline patch 1: pl/plpgsql/src/pl_exec.c (+3/-0 lines) download inline-1.patch*** pl/plpgsql/src/pl_exec.c.orig Tue May 25 12:15:17 1999
--- pl/plpgsql/src/pl_exec.c Sat Jul 3 21:03:01 1999
***************
*** 2486,2491 ****
--- 2486,2494 ----
* 2. It must be a RESULT plan --> no scan's required
* ----------
*/
+ if (plan == NULL) /* utility statement produces this */+ return;+
if (nodeTag(plan) != T_Result)
return;
This might be the same problem that someone (Vince, maybe?) was
complaining about a couple months ago --- I didn't look into it
at the time.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: tgl@sss.pgh.pa.us, sbradley@llnl.gov, pgsql-interfaces@hub.org
Subject: Re: triggers and NOTIFY
In-Reply-To: <17308.931051245@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox