title: Problem adding predicates to outer join
body: <p>I have been tearing my hair out over this:</p>
  
  <pre><code>-- misses nulls
  SELECT *
  FROM BASE_TABLE TAB1
       FULL JOIN BASE_TABLE TAB2
         USING (ANOTHER_ID)
  WHERE (TAB1.ID = 6 OR TAB1.ID IS NULL)
    AND (TAB2.ID = 8 OR TAB2.ID IS NULL);
  
  -- catches nulls
  SELECT *
  FROM (SELECT * FROM BASE_TABLE WHERE ID = 6) TAB1
       FULL JOIN (SELECT * FROM BASE_TABLE WHERE ID = 8) TAB2
         USING (ANOTHER_ID);
  </code></pre>
  
  <p>The first query loses rows where the row in one or the other table does not exist.  Why does the first query fail to do an outer join?</p>
  
  <p>I keep thinking I've got it - the WHERE clause is evaluated first, so the 'OR IS NULL' is not applied later - but that doesn't make sense to me because I've successfully applied 'IS NULL' predicates in the past to select rows after the join.</p>
  
  <p>I would like to make the first query work, for performance reasons - does anyone know what the problem is?</p>