title: Postgresql - INSERT INTO based on multiple SELECT
body: <p>I intend to write a INSERT INTO request in Postgresql based on several SELECT but didn't succeed.
  I have one table containing data I select (srctab), and another one where I insert data (dsttab).
  Here is what I run :</p>
  
  <pre><code>INSERT INTO dsttab (dstfld1, dstfld2) WITH
    t1 AS (
      SELECT srcfld1 
      FROM srctab 
      WHERE srcfld3 ='foo'
    ),
    t2 AS (
      SELECT srcfld5
      FROM srctab 
      WHERE srcfld6 ='bar'
    ) select srcfld1, srcfld5 from srctab;
  </code></pre>
  
  <p>Could you please help to make this work ? Thank you !</p>