Re: Feature: give pg_dump a WHERE clause expression - Mailing list pgsql-patches

From daveg
Subject Re: Feature: give pg_dump a WHERE clause expression
Date
Msg-id 20080601213223.GU2470@sonic.net
Whole thread Raw
In response to Re: Feature: give pg_dump a WHERE clause expression  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: Feature: give pg_dump a WHERE clause expression  (Stephen Frost <sfrost@snowman.net>)
List pgsql-patches
On Sun, Jun 01, 2008 at 04:40:15PM -0400, Andrew Dunstan wrote:
> daveg wrote:
> >
> >I can't imagine many of my clients ever writing another C program or even
> >being willing to pay me to do so. While modularizing pg_dump is a fine
> >idea,
> >I don't think it addresses the same set of use cases and users as this
> >proposal.
>
> It's not clear to me that your use case is very compelling. Does your
> foreign database not support import via CSV or XML? Postgres can now
> produce both of these for any arbitrary query.

The foreign database in question is postgresql.

The feature that the proposed patch enables is to create pg_dump custom
format archives for multiple tables with a predicate. No amount of csv or
xml will do that. Contrived example:

 pg_dump -Fc --table="*._stats:where ts >= now()::date" -f todays_stats.pgd

If I have not been successful in explaining this clearly, please reply
privately to avoid cluttering the list. If you simply disagree about the
usefulness of the feature, I'm fine with that.

-dg


--
David Gould       daveg@sonic.net      510 536 1443    510 282 0869
If simplicity worked, the world would be overrun with insects.

pgsql-patches by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: Feature: give pg_dump a WHERE clause expression
Next
From: Joe Conway
Date:
Subject: Re: [BUGS] BUG #4203: perform dblink() in begin/exception returns wrong SQLSTATE code