<div dir="ltr">I have a test script that generates a large number of inserts.   What I&#39;d like to do is capture the SQL inserts into a file so I can later run the inserts using psql -f foo.sql or psql&#39;s \i command.<div><br></div><div>I thought I might get lucky and call -&gt;new_result( \%cols )-&gt;as_query, but no.</div><div><br></div><div>I know I can create a debug object and capture on -&gt;query_start calls.    But, I&#39;d like to <i>not</i> actually insert into the database.</div><div><br></div><div>I suppose I could die in the query_start method and eval every insert.</div><div><br></div><div>Any other ideas how to capture the insert SQL without actually inserting?</div><div><br></div><div><div><br></div>-- <br><div class="gmail_signature">Bill Moseley<br><a href="mailto:moseley@hank.org" target="_blank">moseley@hank.org</a></div>
</div></div>