title: How to execute PostgreSQL 'get diagnostics'
body: <p>The PostgreSQL 9.3 manual describes this command </p>
  
  <pre><code>'GET DIAGNOSTICS int_var = ROW_COUNT;' 
  </code></pre>
  
  <p>to get the count of affected rows from last <code>insert/update</code> command. 
  When I try this in the GUI (pgAdmin 3, SQL editor pane) and in Python (using psycopg2 package) I get this error:</p>
  
  <pre><code>ERROR: syntax error at or near "GET".
  </code></pre>
  
  <p>What am I doing wrong?</p>