title: SET CONSTRAINTS ALL DEFERRED not working as expected
body: <p>In a PostgreSQL 9.3 database, if I define tables <code>a</code> and <code>b</code> as follows:</p>
  
  <pre><code>CREATE TABLE a(i integer);
  ALTER TABLE a ADD CONSTRAINT pkey_a PRIMARY KEY (i);
  CREATE TABLE b(j integer);
  ALTER TABLE b add CONSTRAINT fkey_ij FOREIGN KEY (j)
        REFERENCES a (i) MATCH SIMPLE
        ON UPDATE CASCADE ON DELETE CASCADE;
  INSERT INTO a(i) VALUES(1);
  </code></pre>
  
  <p>And then do the following:</p>
  
  <pre><code>START TRANSACTION;
  SET CONSTRAINTS ALL DEFERRED;
  INSERT INTO b(j) VALUES(2);
  INSERT INTO a(i) VALUES(2);
  COMMIT;
  </code></pre>
  
  <p>It produces the error below. Why is <code>SET CONSTRAINTS</code> not having the desired effect?</p>
  
  <blockquote>
  <pre><code>ERROR: insert or update on table "b" violates foreign key constraint "fkey_ij"
  SQL state: 23503 Detail: Key (j)=(2) is not present in table "a".
  </code></pre>
  </blockquote>