Marc Munro <marc@bloodnok.com> writes:
> From an application developer's standpoint there are few options, none
> of them ideal:
How about
4) Make all the FK constraints deferred, so that they are only checked
at end of transaction. Then the locking order of transactions that only
modify C is always C1, C2, ..., P.
regards, tom lane