Re: [SQL] After Trigger assignment to NEW

2006-02-25 Thread Stephan Szabo
On Sat, 25 Feb 2006, Achilleus Mantzios wrote: > O Owen Jacobson ?? Feb 24, 2006 : > > > Achilleus Mantzios wrote: > > > > > O Tom Lane ?? Feb 24, 2006 : > > > > > > > By definition, an AFTER trigger is too late to change what was > > > > stored. Use a BEFORE trigger. > > > > > >

Re: [SQL] After Trigger assignment to NEW

2006-02-24 Thread Achilleus Mantzios
O Owen Jacobson έγραψε στις Feb 24, 2006 : > Achilleus Mantzios wrote: > > > O Tom Lane έγραψε στις Feb 24, 2006 : > > > > > 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 in

Re: [SQL] After Trigger assignment to NEW

2006-02-24 Thread Owen Jacobson
Achilleus Mantzios wrote: > O Tom Lane έγραψε στις Feb 24, 2006 : > > > 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. > Bu

Re: [SQL] After Trigger assignment to NEW

2006-02-24 Thread Achilleus Mantzios
O Tom Lane έγραψε στις Feb 24, 2006 : > Alvaro Herrera <[EMAIL PROTECTED]> writes: > > Tom Lane wrote: > >> Achilleus Mantzios <[EMAIL PROTECTED]> writes: > >>> Is there a reason that the NEW values should remain unchanged in AFTER > >>> row triggers? > >> > >> By definition, an AFTER trigger is

Re: [SQL] After Trigger assignment to NEW

2006-02-24 Thread Achilleus Mantzios
O Tom Lane έγραψε στις Feb 24, 2006 : > Achilleus Mantzios <[EMAIL PROTECTED]> 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 some

Re: [SQL] After Trigger assignment to NEW

2006-02-24 Thread Tom Lane
Alvaro Herrera <[EMAIL PROTECTED]> writes: > Tom Lane wrote: >> Achilleus Mantzios <[EMAIL PROTECTED]> 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

Re: [SQL] After Trigger assignment to NEW

2006-02-24 Thread Alvaro Herrera
Tom Lane wrote: > Achilleus Mantzios <[EMAIL PROTECTED]> 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. But a BEFORE trigger would alter the st

Re: [SQL] After Trigger assignment to NEW

2006-02-24 Thread Tom Lane
Achilleus Mantzios <[EMAIL PROTECTED]> 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. regards, tom lane

[SQL] After Trigger assignment to NEW

2006-02-24 Thread Achilleus Mantzios
Hi, i am currently on 7.4.12, and i what i try to do is having an AFTER row trigger nullify one NEW column, so as to prevent a subsequent (AFTER row) trigger from using this column's data. Unfortunately this nullification (assignment) does not have any effect on the next AFTER trigger. The fi