From: | domingo(at)dad-it(dot)com (Domingo Alvarez Duarte) |
---|---|
To: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: A bug in triggers PG 7.1.3 or misunderstand ? |
Date: | 2001-09-28 08:28:25 |
Message-ID: | 70a76315.0109280028.439dff84@posting.google.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
tgl(at)sss(dot)pgh(dot)pa(dot)us (Tom Lane) wrote in message news:<28856(dot)1001608373(at)sss(dot)pgh(dot)pa(dot)us>...
> I think you need "return old", not "return new", in the body of the
> trigger if you want the delete to take place. new would be NULL in
> a delete situation ...
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/users-lounge/docs/faq.html
Ok I saw that in the documentation so I tryied a variant of it:
if TG_OP = 'DELETE' then
return old;
else
return new;
end if;
But the TG_OP comes empty and it allawys try return new preventing the
delete to happen.
And that was supposed to work isn't it ?
From | Date | Subject | |
---|---|---|---|
Next Message | sreedhar | 2001-09-28 13:29:10 | |
Previous Message | Robin's PG-SQL List | 2001-09-28 06:33:06 | Re: Aggregate Aggravation |