Re: [HACKERS] drop before create in pg_dump

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Brook Milligan <brook(at)trillium(dot)NMSU(dot)Edu>
Cc: hackers(at)postgreSQL(dot)org, patches(at)postgreSQL(dot)org
Subject: Re: [HACKERS] drop before create in pg_dump
Date: 1999-01-15 23:44:32
Message-ID: 24649.916443872@sss.pgh.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.

regards, tom lane

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Vince Vielhaber 1999-01-16 00:39:14 Time Zones
Previous Message Brook Milligan 1999-01-15 21:08:46 drop before create in pg_dump