title: Postgresql CREATE TABLE AS INSERT RETURNING
body: <p>I trying to perform something like</p>
  
  <pre><code>CREATE TEMP TABLE tblname AS (
    INSERT INTO tbl2 FROM SELECT(1,1) RETURNING a,b 
  );
  </code></pre>
  
  <p>but i've got ERROR: syntax error at or near "INSERT";</p>
  
  <p>Is it possible to combine <strong>CREATE TABLE AS SELECT</strong> and <strong>INSERT FROM SELECT RETURNING</strong> clauses?</p>