"Josh Berkus" <josh@agliodbs.com> writes:
>> ERROR: triggered data change violation on relation "groups"
> Yes. For some technical reason ( I'm not clear on this ) you cannot
> both add and delete the same row within a PostgreSQL transaction. This
> is a known issue in 7.1.x; I do not know if it is fixed in 7.2.
Actually, we've just removed that error check in 7.2. The discussion
concluded that we'd misinterpreted the spec in treating this condition
as an error. You can simply dike out the error call (it's in
src/backend/commands/trigger.c, IIRC) if it's getting in your way in
7.1.
regards, tom lane