Export data with inserts statements
Is it possible to export data with insert statements over COPY?
Not as written. Why do you prefer inserts?
@mla thanks for getting back to me! I m using pgmem for unit tests. It does not allow COPY to populate the db.
k, we'd have to look. The COPY is convenient since we kind of fake it out.. we tell it we're going to create the real table name, but then we dump the data from the sample tables. Not sure how we can do that with inserts easily.
But one hack might be to use pg_sample to generate the sample db. Restore it. And then use pg_dump to dump it as insert statements.
@mla thanks! The hack has worked for me. It does the job.