Re: [HACKERS] drop before create in pg_dump

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: tgl(at)sss(dot)pgh(dot)pa(dot)us (Tom Lane)
Cc: brook(at)trillium(dot)NMSU(dot)Edu, hackers(at)postgreSQL(dot)org, patches(at)postgreSQL(dot)org
Subject: Re: [HACKERS] drop before create in pg_dump
Date: 1999-01-16 03:50:51
Message-ID: 199901160350.WAA02152@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> Brook Milligan <brook(at)trillium(dot)NMSU(dot)Edu> writes:
> > pg_dump won't drop stuff before trying to create it; this makes
> > dropping a single table (say) and recreating it difficult to automate
> > since it is subject to error if all the stuff doesn't get dropped
> > properly. The following patch causes pg_dump to emit DROP ...
> > statements prior to emitting CREATE ... statements.
>
> I think that ought to be driven by a switch to pg_dump ...
> much of the time, I would *want* pg_dump's script to fail
> if there's already an existing item of the given name.
>
> I see your concern, I just don't think it's the only scenario.

I agree. I don't like it removing stuff before creating it. pg_dump
already does a lot. But I do agree it is difficult to automate
destroy/create.

--
Bruce Momjian | http://www.op.net/~candle
maillist(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Taral 1999-01-16 04:40:53 Repository no longer compiles
Previous Message Thomas G. Lockhart 1999-01-16 02:42:47 Re: [HACKERS] Time Zones