title: ERROR: invalid input syntax for type date: ""
body: <p>I have the following psql query and can't understand why I get error <strong>ERROR:  invalid input syntax for type date: ""</strong>.</p>
  
  <p>My query looks as follows:</p>
  
  <pre><code>SELECT count(*) FROM campaigns 
  WHERE 
      dstart &gt;= '2010-09-02' AND 
      dend &lt;= '2010-09-02' AND 
      status != 'S' AND 
      status != 'C' AND 
      status != 'E' AND 
      (dsignoff &lt;&gt; '' AND dsignoff is not null) AND 
      (dstart &lt;&gt; '' AND dstart is not null) AND 
      (dend &lt;&gt; '' AND dend is not null) AND 
      clientid=20005294;
  </code></pre>
  
  <p>dstart,dend and dsignoff are all defined as date types.</p>