logo       

Re: User-friendliness for DROP RESTRICT/CASCADE: msg#00912

Subject: Re: User-friendliness for DROP RESTRICT/CASCADE
Tom Lane wrote:
> 
> DROP TYPE widget RESTRICT; -- fail
> NOTICE:  operator <% depends on type widget
> NOTICE:  operator >% depends on type widget
> NOTICE:  operator >=% depends on type widget
> ERROR:  Cannot drop type widget because other objects depend on it
>       Use DROP ... CASCADE to drop the dependent objects too
> 
> Any objections?
> 
> Also, would it be a good idea to make it *recursively* report all
> the indirect as well as direct dependencies?  The output might get
> a little bulky, but if you really want to know what DROP CASCADE
> will get you into, seems like that is the only way to know.
> 
> To work recursively without getting into an infinite loop in the case of
> circular dependencies, we'd need to make DROP actually drop each object
> and CommandCounterIncrement, even in the RESTRICT case; it would rely on
> rolling back the entire transaction when we finally elog(ERROR).  This
> might make things a tad slow, too, for something with many dependencies
> ... but I don't think we need to worry about making an error case fast.
> 
> Comments?

It would be nice if it is easy to do.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@xxxxxxxxxxxxxxxx               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026



---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html





<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
web.pylons.gene...    hurd.l4/2002-10...    kernel.commits....    user-groups.lin...    yellowdog.gener...    java.drools.use...    security.openva...    package-managem...    linux.debian.us...    qnx.openqnx.dev...    genealogy.gramp...    file-systems.if...    voip.wengophone...    tex.context/200...    ietf.smime/2003...    audio.csound.de...    culture.region....    xfree86.devel/2...    mobile.kannel.u...    distributed.con...    education.engli...    org.user-groups...    bug-tracking.gn...    recreation.bicy...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe