title: Unexpected IF ( in END IF ) in if statement
body: <p>I have read the <a href="http://www.postgresql.org/docs/9.1/static/plpgsql-control-structures.html" rel="nofollow">PostgreSQL control structure page</a> and I decided to make a test:</p>
  
  <pre><code>IF 1 = 0 THEN
      INSERT INTO my_table (num_a, num_b)
      VALUES (1, 1);
  END IF;
  </code></pre>
  
  <p>I have tested the insert statement alone and it works fine. But when I run the above code in <code>psql</code> I get:</p>
  
  <pre><code>ERROR:  syntax error at or near "IF" 
  LINE 1: END IF;
              ^
  </code></pre>
  
  <p>What is wrong with it?</p>