Re: db partial dumping with pg_dump

From: Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Rod Taylor <rbt(at)zort(dot)ca>, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: db partial dumping with pg_dump
Date: 2002-08-13 17:21:25
Message-ID: Pine.GSO.4.44.0208132014470.11724-100000@ra.sai.msu.su
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, 13 Aug 2002, Tom Lane wrote:

> This patch seems extremely messy to me. Unless I'm missing something,
> -w just plain fails except when you are dumping a specific table (ie,
> -t must be given as well). And heaven help you if you specify a
> different table in -t than the one -w is selecting from. This isn't
> well thought out.

You're right. The patch I've sent was no way for submitting to sources !
I just asked about the feature and attached to message for Rod Taylor.

>
> I'm not at all convinced that such a thing belongs in pg_dump anyway.
> It'd be more useful as a manually-invokable feature, I think. You
> can almost do this in psql with
> select * from table where something
> \g outfile
> but I don't think you can get psql to emit the data in a form that can
> be reloaded reliably (it won't quote data characters that look the same
> as column delimiters, for instance).
>

that was the reason we don't use psql for dumping

> What would seem to make sense is adding a WHERE-clause option to
> COPY TO, and then you could go
> COPY table TO 'myfile' WHERE ...
> We already have column-list support in COPY, so we can already slice the
> table vertically --- WHERE would let you slice it horizontally, which
> seems a natural extension. (BTW, has anyone taught psql's \copy about
> column lists? AFAIR the original patch was only against the backend.)
>
> I'm finding it hard to visualize situations where I'd want the extra
> baggage of pg_dump for something like this. If I want the schema at
> all, I'll probably want it separate from the data so that I can hack
> the schema conveniently --- so I'd want to do a "pg_dump -s -t table"
> and then do the selective copying separately.
>

that'd be nice ! I often need such a feature because db at work are often
too large to play at home :-)

> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org
>

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2002-08-13 17:22:44 Re: Everything is now "required by the database system"
Previous Message Peter Eisentraut 2002-08-13 17:19:06 Everything is now "required by the database system"