4 ms·
You can do this in postgres as well, with something like: begin; alter table t2 disable trigger all; insert into t2 (t1_id) values (20); alter tabl
by shabble 9y ago
You can do this in postgres as well, with something like:
begin; alter table t2 disable trigger all;
insert into t2 (t1_id) values (20);
alter table t2 enable trigger all;
commit;
Setting constraints to deferrable/initially deferred[1] is probably a nicer way for any non-insane thing you're trying to achieve with such, though :)
[1] https://www.postgresql.org/docs/9.6/static/sql-set-constraints.html https://www.postgresql.org/docs/9.6/static/sql-set-constrain...