Putting restrictions on pg_dump?

From: Benjamin Smith <lists(at)benjamindsmith(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Putting restrictions on pg_dump?
Date: 2006-01-05 05:00:25
Message-ID: 200601042100.26037.lists@benjamindsmith.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Is there a way to put a limit on pg_dump, so that it doesn't dump ALL data,
but that matching a particular query?

Something like:

pg_dump -da --attribute-inserts -t "customers" \
--matching-query="select * from customers where id=11";

I'd like to selectively dump information from a query, but using the output
format from pg_dump so that it can be used to create a (partial) database.

Can this sort of thing be done?

-Ben
--
"The best way to predict the future is to invent it."
- XEROX PARC slogan, circa 1978

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Patrick TJ McPhee 2006-01-05 05:17:30 Re: Moving Tablespaces
Previous Message Benjamin Smith 2006-01-05 03:57:49 Re: Anyone doing a 8.1.0-ia64-RHEL4-as.rpm ?