From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | amorati <antonio(dot)cosas(at)terra(dot)es> |
Cc: | pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: Trigger changes visibility |
Date: | 2005-01-17 18:54:06 |
Message-ID: | 8922.1105988046@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
amorati <antonio(dot)cosas(at)terra(dot)es> writes:
> CREATE OR REPLACE FUNCTION "public"."DisparadorHijoBorradoCMin1" ()
> RETURNS trigger AS
> ...
> LANGUAGE 'plpgsql' IMMUTABLE CALLED ON NULL INPUT SECURITY INVOKER;
> The problem is that the row's count done by the trigger is the same
> number of rows that appears in the table before de delete was executed.
Don't use an IMMUTABLE function as a trigger. I'm not sure if the
system should actually prohibit this, but the function is doing what
it's spec'd to, namely not seeing any side-effects of the calling query.
See
http://developer.postgresql.org/docs/postgres/xfunc-volatility.html
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Magnus Hagander | 2005-01-17 20:16:37 | Re: BUG #1403: Failed to create process: 2 |
Previous Message | Tom Lane | 2005-01-17 18:51:26 | Re: psql 8.0.0 rc5 parser error on \dt? |