Re: db partial dumping with pg_dump
От | Oleg Bartunov |
---|---|
Тема | Re: db partial dumping with pg_dump |
Дата | |
Msg-id | Pine.GSO.4.44.0208132014470.11724-100000@ra.sai.msu.su обсуждение исходный текст |
Ответ на | Re: db partial dumping with pg_dump (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | 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@postgresql.org > Regards, Oleg _____________________________________________________________ Oleg Bartunov, sci.researcher, hostmaster of AstroNet, Sternberg Astronomical Institute, Moscow University (Russia) Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/ phone: +007(095)939-16-83, +007(095)939-23-83
В списке pgsql-hackers по дате отправления: