Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.


I'm trying to create a dump file that only contains the data in my database. I would like it to create the data with the INSERT command. In reading the manual, (http://www.postgresql.org/docs/9.2/static/app-pgdump.html#PG-DUMP-EXAMPLES) i see that I can use either

  • --column-insert
  • --attribute-insert

It wasn't clear from the manual what the difference is. So I tried both and did a diff on the files. There are differences and I'm wondering why. Can someone tell me what the difference is between these two commands?

Here's the full command I'm running:

pg_dump -a --column-inserts -U postgres testdb > /tmp/test_data_as_inserts2.sql

and :

 pg_dump -a --attribute-inserts -U postgres testdb > /tmp/test_data_as_inserts.sql

Any tips would be appreciated. In the meantime, I'm going to dig in and see what's different between these two files... why certain records are included and others not.


share|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.