<div dir="ltr">I have a test script that generates a large number of inserts. What I'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's \i command.<div><br></div><div>I thought I might get lucky and call ->new_result( \%cols )->as_query, but no.</div><div><br></div><div>I know I can create a debug object and capture on ->query_start calls. But, I'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>