title: Returning record ID's from PostgreSQL using PetaPoco
body: <p>PetaPoco PostgreSQL 11.1</p>
  
  <p>I am attempting to get a list of deleted record id's. This does NOT work:</p>
  
  <pre><code>var sql = new Sql()
        .Append(@"; WITH _in (lastname, firstname, birthdate, description, dencounter) AS (
                    VALUES ( UPPER(@0), UPPER(@1), @2::date, LOWER(@3), @4::date  )
                         )
                     DELETE FROM dx d
                      USING _in n
                     JOIN patients pt ON (pt.lastname, pt.firstname, pt.birthdate) = (n.lastname, n.firstname, n.birthdate)
                    JOIN disease z ON (z.description = n.description)
                    WHERE (d.patient_recid, d.disease_recid, d.dposted)=(pt.recid, z.recid, n.dencounter)
                 RETURNING d.recid;", lastName, firstName, birthDate, description, tencounter);
  
        return db.Fetch&lt;int?&gt;(sql);
  </code></pre>
  
  <p>The RETURNING is not being honored. (I receive the "1" showing Delete success not the recid value). It runs correctly in pgAdmin 4.</p>
  
  <p>Is there anyway to do this with PetaPoco (and C#) ? I am looking not just for a single recid, but an IEnumerable of int? from many deletions.</p>
  
  <p>TIA</p>