title: psql syntax error at command line with variable interpolation
body: <p>I have a scenario like below with Postgres 9.4.5: </p>
  
  <pre><code>CREATE OR REPLACE FUNCTION something(varA text) RETURNS void AS $$
  BEGIN
      ...
      RAISE INFO '%',varA;
  END;
  $$
  LANGUAGE plpgsql;
  
  DO
  $$
  declare
      varA text := :cmd_line_arg;
  begin
      perform something(varA);
  end;
  $$
  </code></pre>
  
  <p>All this resides in some file <code>plpgsql.sql</code> and is executed like so:</p>
  
  <pre><code>psql -v cmd_line_arg='value' -U postgres -d postgres -f plpgsql.sql
  </code></pre>
  
  <p>I receive <code>syntax error at or near</code>':'</p>
  
  <p>I have also found errors when using the string concatenation operator <code>||</code>.   </p>
  
  <p>What am I missing here? Is it something to do with the <code>DO</code>?</p>
  
  <p>NOTE: This <a href="https://stackoverflow.com/questions/28868167/psql-command-line-variable-interpolation-leads-to-syntax-error">link</a> did not help.</p>