title: Pgsql. Returning field as insert result in function
body: <p>I can return id as an <code>INSERT</code> result, like</p>
  
  <pre><code>INSERT INTO table(id,field) VALUES($id,$value) RETURNING id;
  </code></pre>
  
  <p>But i cannot return it and assign to variable into my function</p>
  
  <pre><code>var = INSERT INTO table(id,field) VALUES($id,$value) RETURNING id;
  </code></pre>
  
  <p>or</p>
  
  <pre><code>SELECT INTO var INSERT INTO table(id,field) VALUES($id,$value) RETURNING id;
  </code></pre>
  
  <p>don't work.
  How can i do it?</p>