How to generate PostgreSQL COPY bin files?
Your best bet really is to create CSV files and then import them with COPY.  If you want to, you can then wrap them simply in a COPY ... WITH CSV FROM STDIN statement.

The existing docs on the COPY command should be sufficient.  See http://www.postgresql.org/docs/9.1/static/sql-copy.html