title: insert of multi columns with "with" in postgresql
body: <p>My query is like this</p>
  
  <pre><code>WITH p AS (  select idA from TableA   )  
  insert into TableB(idB,idA,city,data) 
     select  sp_get_id('TableB'),p.idA from p,'TO',now()
  </code></pre>
  
  <p>Note: <code>sp_get_id('TableB')</code> is a stored procedure to generated id. I execute the query above and it is wrong.</p>