title: postgres: constraint check and null values
body: <p>please have a look at the following table:</p>
  
  <pre><code>   name  |  x  |  y
  ---------+-----+------
     foo   |  3  |  5
     bar   | 45  | 99 
    foobar | 88  | 
    barfoo |  0  | 45
  </code></pre>
  
  <p>I want to add a constraint CHECK ( y > x ), but this obviously will fail due it is violated by the row 'foobar'.</p>
  
  <p>How do I create a constraint that says: check (y > x), but only if y not null?</p>