Florian, > This sounds like what is really needed is a way to lock a certain > condition, namely the existance or non-existance of a record with > certain values in certain fields. This would not only help this case, > it would also help RI triggers, because those wouldn't have to acquire > a share lock on the referenced rows anymore.
That's called "predicate locking" and it's very, very hard to do. -- Josh Berkus PostgreSQL @ Sun San Francisco ---------------------------(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