Re: [GENERAL] Isolation / Visibility inside a trigger

2006-11-03 Thread Jorge Godoy
Martijn van Oosterhout writes: > On Fri, Nov 03, 2006 at 10:24:21AM -0300, Jorge Godoy wrote: >> But then, the answer to my question is that even inside the same transaction >> or receiving the NEW row those functions called by the trigger shouldn't see >> the information. Did I get it right? >

Re: [GENERAL] Isolation / Visibility inside a trigger

2006-11-03 Thread Martijn van Oosterhout
On Fri, Nov 03, 2006 at 10:24:21AM -0300, Jorge Godoy wrote: > But then, the answer to my question is that even inside the same transaction > or receiving the NEW row those functions called by the trigger shouldn't see > the information. Did I get it right? Correct. Before triggers happen prior t

Re: [GENERAL] Isolation / Visibility inside a trigger

2006-11-03 Thread Jorge Godoy
Martijn van Oosterhout writes: > "Before" triggers can't see the data changes yet, they are, by > definition, before the commit. That's what I thought... But then, I was in doubt with the serialization level and the fact that all was being done inside the very same transaction. I thought all da

Re: [GENERAL] Isolation / Visibility inside a trigger

2006-11-03 Thread Martijn van Oosterhout
On Fri, Nov 03, 2006 at 09:49:17AM -0300, Jorge Godoy wrote: > I'm trying to fix a bug (?) in my design but I'd like to understand my mistake > first, so that I don't do that again. > But when I converted those to (before) triggers I started having a problem > where it tries reading data from th

[GENERAL] Isolation / Visibility inside a trigger

2006-11-03 Thread Jorge Godoy
Hi! I'm trying to fix a bug (?) in my design but I'd like to understand my mistake first, so that I don't do that again. I'm inserting rows into a table that are results from an external physical process and I have some operations that I was automating inside the database with triggers: -