title: Why I get error in DO$$ - END$$ statement in Postgres
body: <p>I get error:</p>
  <blockquote>
  <p>pq: syntax error at or near &quot;DO&quot;</p>
  </blockquote>
  <p>My simple statement:</p>
  <pre><code>DO $$
  DECLARE
    _iter int;
  BEGIN
    _iter:= -1;
    /* some logic */
  END
  $$;
  </code></pre>
  <p>PS: I commented out the logic to understand what the problem is</p>