title: PostgreSQL does not use proper partition on UPDATE statement
body: <p>Executing a regular <code>UPDATE</code> statement on a  <strong>partitioned</strong> table seems to be worst than doing it in a regular one.</p>
  <h1>Setup</h1>
  <pre><code>CREATE TABLE users
  (
    id   VARCHAR(10) NOT NULL,
    name VARCHAR(10) NOT NULL
  ) PARTITION BY HASH (id);
  
  ALTER TABLE users ADD PRIMARY KEY (id);
  
  CREATE TABLE users_p0 PARTITION OF users FOR VALUES WITH (MODULUS 3, REMAINDER 0);
  CREATE TABLE users_p1 PARTITION OF users FOR VALUES WITH (MODULUS 3, REMAINDER 1);
  CREATE TABLE users_p2 PARTITION OF users FOR VALUES WITH (MODULUS 3, REMAINDER 2);
  
  INSERT INTO users (id, name) VALUES ('1', 'Blue');
  INSERT INTO users (id, name) VALUES ('2', 'Green');
  INSERT INTO users (id, name) VALUES ('3', 'Red');
  INSERT INTO users (id, name) VALUES ('4', 'Yellow');
  </code></pre>
  <h1>Query plan for <code>SELECT</code> statement</h1>
  <pre><code>EXPLAIN SELECT * FROM users WHERE id = '1';
  </code></pre>
  <h2>Result (cost=0.15..2.37)</h2>
  <pre><code>Append  (cost=0.15..2.37 rows=1 width=76)
    -&gt;  Index Scan using users_p0_pkey on users_p0  (cost=0.15..2.37 rows=1 width=76)
          Index Cond: ((id)::text = '1'::text)
  </code></pre>
  <h1>Query plan for <code>UPDATE</code> statement</h1>
  <pre><code>EXPLAIN UPDATE users SET name = 'New blue' WHERE id = '1';
  </code></pre>
  <h2>Result (cost=0.15..7.10)</h2>
  <pre><code>Update on users  (cost=0.15..7.10 rows=3 width=82)
    Update on users_p0
    Update on users_p1
    Update on users_p2
    -&gt;  Index Scan using users_p0_pkey on users_p0  (cost=0.15..2.37 rows=1 width=82)
          Index Cond: ((id)::text = '1'::text)
    -&gt;  Index Scan using users_p1_pkey on users_p1  (cost=0.15..2.37 rows=1 width=82)
          Index Cond: ((id)::text = '1'::text)
    -&gt;  Index Scan using users_p2_pkey on users_p2  (cost=0.15..2.37 rows=1 width=82)
          Index Cond: ((id)::text = '1'::text)
  </code></pre>
  <p>I expected the query planner to access directly to <em>users_p0</em> instead of accessing all partitions</p>