Skip site navigation (1) Skip section navigation (2)

Re: Fixing pg_dump

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
Cc: Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Fixing pg_dump
Date: 2004-06-28 02:18:55
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au> writes:
> We currently fully qualify DROP command with the namespace so that drops 
> will not accidentally modify the system catalogs.  Shouldn't this also 
> be necessary on ALL non-CREATE commands?
> Otherwise, if the create table command associated with each of these 
> fails (for whatever reason), the script could happily carry on and 
> modify the system catalog tables?

I don't buy it.  There's a tradeoff here between certainty of doing what
you want and having a script that is easy to edit.  DROP is a dangerous
weapon and we should be circumspect about applying it, but ALTER OWNER
etc are much less so.

Also, the point about qualifying the DROP is that you do not know
whether the object is there initially, and so you could be dropping
the wrong thing even in non-error cases.  The scenario where the CREATE
fails is much less probable.

			regards, tom lane

In response to


pgsql-hackers by date

Next:From: Tom LaneDate: 2004-06-28 03:11:23
Subject: Unifying type and function names
Previous:From: Tom LaneDate: 2004-06-28 02:09:08
Subject: Re: Fixing pg_dump

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group