Suppose I have the following tables
CREATE TABLE plugins ( id int primary key, type text); insert into plugins values (1,\'matrix\'); insert into plugins va
One way of handling this is to use serializable transactions.
http://wiki.postgresql.org/wiki/SSI#FK-Like_Constraints