Thread: pg_restore and adding a column

pg_restore and adding a column

From
"Thomas T. Thai"
Date:
If I dump a DB out by first dumping out the schema only, then the entire
db like:

  pg_dump --schema-only --file=mydb_schema.pgsql mydb
  pg_dump --format=c --file=mydb.dump mydb

Then I add a column to the schema. If I now load the data back:

  pg_restore --data-only -d mydb -f mydb.dump

pg_restore should handle that ok correct? In other words, it would only
restore the data to the appropriate column using column names and not just
the order of the columns.

--
Thomas T. Thai