enhancement request for pg_restore

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



PostgreSQL 9.4.x

I love using the PostgreSQL database.  It is wonderful.

Please consider adding to pg_restore the command line option to exclude one or more tables similar to the pg_dump option.

Example:

--exclude-table=table

Why?  I like to restore all tables within a particular namespace from our production database to our test database.  But there are many times when you have some tables that hold data you don't necessarily need information from.  In those cases I would exclude those tables.  I would then do a second pg_restore so I could get the schema for those particular tables.

Example of how this would work:

pg_restore -U someuser -h localhost -d mydatabase --schema=myschema  --exclude-table=myschema.table1  --exclude-table=myschema.table2 --format=custom  /my/backup/to/restore

pg_restore -U someuser -h localhost -d mydatabase --schema-only  -- table=myschema.table1  --table=myschema.table2  --format=custom  /my/backup/to/restore

Thanks for considering this enhancement to pg_restore.

Lance Campbell
Web Services
University of Illinois




-- 
Sent via pgsql-admin mailing list (pgsql-admin@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux