From: | Achilleus Mantzios <achill(at)matrix(dot)gatewaynet(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: After Trigger assignment to NEW |
Date: | 2006-02-24 19:47:51 |
Message-ID: | Pine.LNX.4.44.0602242138560.20246-100000@matrix.gatewaynet.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
O Tom Lane έγραψε στις Feb 24, 2006 :
> Achilleus Mantzios <achill(at)matrix(dot)gatewaynet(dot)com> writes:
> > Is there a reason that the NEW values should remain unchanged in AFTER
> > row triggers?
>
> By definition, an AFTER trigger is too late to change what was stored.
> Use a BEFORE trigger.
Too late if someone wants to store it.
I wanna store the intented original values, thats why i use AFTER trigger.
But i would like to alter what a final AFTER trigger would see.
I'll elabarote a little.
An update happens.
The row is stored.
An after trigger is fired that alters some NEW columns
(nullifies them), aiming for a subsequent trigger
to see the altered results .
It should be something like a pointer to a HeapTuple, (right?),
so that would be feasible i suppose.
I would not even make a post if it was something that trivial.
I hope you get my point.
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: In versions below 8.0, the planner will ignore your desire to
> choose an index scan if your joining column's datatypes do not
> match
>
--
-Achilleus
From | Date | Subject | |
---|---|---|---|
Next Message | Achilleus Mantzios | 2006-02-24 19:51:24 | Re: After Trigger assignment to NEW |
Previous Message | Owen Jacobson | 2006-02-24 18:58:25 | Re: After Trigger assignment to NEW |