Re: db partial dumping with pg_dump

From: Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>
To: Rod Taylor <rbt(at)zort(dot)ca>
Cc: Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: db partial dumping with pg_dump
Date: 2002-08-13 13:03:45
Message-ID: Pine.GSO.4.44.0208131600150.1769-200000@ra.sai.msu.su
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 13 Aug 2002, Rod Taylor wrote:

> On Tue, 2002-08-13 at 07:49, Oleg Bartunov wrote:
> > We have a patch for pg_dump which adds a possibility to dump
> > a part of table, for example:
> >
> > dump Top.Science.Astronomy heirarchy from dmoz catalog
> >
> > pg_dump -d -t dmoz -w "select * from dmoz where path <@ 'Top.Science.Astronomy'" dmoz
> >
> > We found it's very useful. We'd like to extend it to use also with COPY
> > but it has no support for select (of course it will works only for
> > special case when ALL columns retrieved).
> >
> > The question is: Is't worth to submit patch for pg_dump and look into
> > copy code ?
>
> I've been asked by co-workers for information on how to do this type of
> thing. They do partial table dumps to a development system for the
> purpose of finding / eliminating bugs.
>
> That said, it may be smart to make the 'select * from <table>' part
> yourself, and let the user supply a where clause.
>

find patch (7.2) in attachement. Note, it works with -d (insert mode) option.

>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly
>

Regards,
Oleg
_____________________________________________________________
Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
Sternberg Astronomical Institute, Moscow University (Russia)
Internet: oleg(at)sai(dot)msu(dot)su, http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83

Attachment Content-Type Size
pg_dump.patch text/plain 3.7 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Rod Taylor 2002-08-13 13:14:34 Re: [COMMITTERS] pgsql-server/src
Previous Message Larry Rosenman 2002-08-13 13:02:05 Re: [HACKERS] Linux Largefile Support In Postgresql RPMS