I have been playing around with PostgreSQL lately, and am having trouble understanding how to backup and restore a single table.
I used pgadmin3 to backup a single table in my database, in order to copy it to a different server. When I try to do a pg_restore on the file, I get error messages saying that the sequence does not exist:
pg_restore: [archiver (db)] could not execute query: ERROR: relation "businesses_id_seq" does not exist
Command was:
CREATE TABLE businesses (
id integer DEFAULT nextval('businesses_id_seq'::regclass) NOT NULL,
name character varyin...
It looks like the dump file did not include the sequence for my auto incrementing column. How do I get it to include that?