title: Intervals: How can I make sure there is just one row with a null value in a timstamp column in table?
body: <p>I have a table with a column which contains a 'valid until' Date and I want to make sure that this can only be set to null in a single row within the table. Is there an easy way to do this?</p>
  
  <p>My table looks like this (postgres):</p>
  
  <pre><code>CREATE TABLE 123.myTable(
  some_id integer NOT NULL,
  valid_from timestamp without time zone NOT NULL DEFAULT now(),
  valid_until timestamp without time zone,
  someString character varying)
  </code></pre>
  
  <p><code>some_id</code> and <code>valid_from</code> is my PK. I want nobody to enter a line with a null value in column valid_until if there is already a line with null for this PK.</p>
  
  <p>Thank you</p>