Constraint defined DEFERRABLE INITIALLY IMMEDIATE is still DEFERRED?
问题 In connection with this answer I stumbled upon a phenomenon I cannot explain. Version: PostgreSQL 9.1.2 on x86_64-unknown-linux-gnu, compiled by gcc-4.4.real (Debian 4.4.5-8) 4.4.5, 64-bit Consider the following demo. Testbed: CREATE TEMP TABLE t ( id integer ,txt text ,CONSTRAINT t_pkey PRIMARY KEY (id) DEFERRABLE INITIALLY IMMEDIATE ); INSERT INTO t VALUES (1, 'one') ,(2, 'two'); 1) UPDATE statement modifying multiple rows: UPDATE t SET id = t_old.id FROM t t_old WHERE (t.id, t_old.id) IN (