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