title: Why can't parameters be null or empty strings when compared in a SELECT in PG?
body: <p>This is very strange. For a very long time, I've been <code>INSERT</code>ing parameters into PG queries from PHP like this:</p>
  <pre><code>INSERT INTO table (column) VALUES ($1);
  </code></pre>
  <p>The $1 can be a boolean null or an empty string. Works perfectly.</p>
  <p>Now, I'm &quot;suddenly&quot; getting errors, probably because I've never happened to encountered this situation before:</p>
  <pre><code>SELECT * FROM table WHERE column &lt;&gt; $1;
  </code></pre>
  <p>If $1 is either null or an empty string, I get:</p>
  <pre><code>pg_query(): Query failed: ERROR:  there is no parameter $1
  </code></pre>
  <p>At first, I thought it might be logically related to the <code>&lt;&gt;</code> operator, but this also gives the very same error:</p>
  <pre><code>SELECT * FROM table WHERE column = $1;
  </code></pre>
  <p>I have foggy memories of <code>NULL</code> being annoyingly &quot;special case&quot; in PG, but even empty strings? And why specifically for <code>SELECT</code>s but not <code>INSERT</code>s?</p>