Why is pgdump only listing one of the three tables that I want data for?

51 views Asked by At

I’m using Postgres 9.5 on Mac Sierra. I want to output data from three tables so I have done this

pg_dump -U mydb --format plain --section data --column-inserts --file "t1.backup" --table “addresses” --table “table1” --table "table2" mydb

The order of the table data is listed is important because I don’t get foreign key errors when I re-import it. However, in the above listing, despite the fact that I can do this in my database

localhost:mydb davea$ mydb
psql (9.5.0, server 9.5.1)
Type "help" for help.

mydb=> select count(*) FROM table1;
 count 
-------
 19516
(1 row)

When I open my dump file that is generated from the above statements, I have no data for the “table1” or the “addresses” table. There are only INSERT statements for the “table2” table. What’s wrong with my dump statement that only one of my tables’ data is getting dumped?

0

There are 0 answers