> Actually I just figured out, that is is not the trigger but the two
> cascade on update triggers collide.
> It happens also without the trigger:
>
> lt=# UPDATE ltlocation SET id = 45555 WHERE id = 18999;
> ERROR: insert or update on table "ltlocationpath" violates foreign
> key constraint "ltlocancester_fkey"
> DETAIL: Key (ltlocancester_id)=(18999) is not present in table
> "ltlocation".
> CONTEXT: SQL statement "UPDATE ONLY "public"."ltlocationpath" SET
> "ltlocation_id" = $1 WHERE "ltlocation_id" = $2"
>
> I think the two foreign key constraints together make it impossible
> to change the primary key (which isn't needed),
> as they would have to run "as one" which they can't...
The two foreign key constraints worked fine when I tried them,
the only problem was the trigger.
I don't get what you describe.
Have you changed anything in the definitions?
If yes, post table, key, and trigger definitions as you have them now.
Yours,
Laurenz Albe