Re: Adding WHERE clause to pg_dump - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: Adding WHERE clause to pg_dump
Date
Msg-id 1217013995.3894.979.camel@ebony.2ndQuadrant
Whole thread Raw
In response to Re: Adding WHERE clause to pg_dump  ("Joshua D. Drake" <jd@commandprompt.com>)
Responses Re: Adding WHERE clause to pg_dump  ("Joshua D. Drake" <jd@commandprompt.com>)
List pgsql-hackers
On Fri, 2008-07-25 at 11:46 -0700, Joshua D. Drake wrote:
> On Fri, 2008-07-25 at 19:33 +0100, Simon Riggs wrote:
> > On Fri, 2008-07-25 at 13:31 -0400, Tom Lane wrote:
> > > Simon Riggs <simon@2ndquadrant.com> writes:
> > > > Attached patch implements WHERE clauses for pg_dump.
> > > 
> > > I still have serious reservations about adding such an ugly,
> > > non-orthogonal wart to pg_dump.  Why is it not appropriate to just
> > > do a COPY (SELECT ...) TO STDOUT when you need this?
> > 
> > So you can dump a coherent sample database in one command, not 207.
> > 
> > Every user of PostgreSQL wants a dev/test database. If the database is
> > large it isn't practical to take a complete copy. Nor is it practical to
> > hand-write a data sampling extraction program and if you do, its usually
> > imperfect in many ways.
> > 
> > Adding this feature gives a very fast capability to create sample
> > databases, or incremental backups for many cases.
> 
> Not sure I buy this argument. I am all for usability and I would be the
> first to shout about the general ridiculousness of pg_dump/all/restore
> but in this case I think Tom is right. This feature could easily be done
> in a script without harassing pg_dump.

You can do it, yes. But it takes a lot longer. If the time to implement
was similar, then I would immediately agree "feature available already".

pg_dump is not "harassed" by this. What is lost by adding this feature?

-- Simon Riggs           www.2ndQuadrant.comPostgreSQL Training, Services and Support



pgsql-hackers by date:

Previous
From: "Manoel Henrique"
Date:
Subject: Re: Research/Implementation of Nested Loop Join optimization
Next
From: Tom Lane
Date:
Subject: Re: [RFC] Unsigned integer support.