Re: DROP OWNED BY doesn't work

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-patches(at)postgreSQL(dot)org
Subject: Re: DROP OWNED BY doesn't work
Date: 2006-08-20 17:37:44
Message-ID: 20060820173744.GA31648@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Tom Lane wrote:
> Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
> > Ok, this patch implements more or less this idea; except that instead of
> > checking the list of implicit dependencies for later objects, we iterate
> > twice on the list of objects to delete, and create a list of implicit
> > dependencies on all of them the first time, and delete those not on that
> > list the second time.
>
> In the light of morning it occurs to me that probably the best code
> factoring for this is for dependency.c to export a
> performMultipleDeletions() function that takes an objectAddresses list
> of targets and does all the dependency-chasing internally. This would
> reduce the amount of cruft that has to be exported from dependency.c.

Sounds a pretty obvious move. This would be it then. Please note the
changes to the ObjectAddresses stuff, mainly to not move the definition
of struct ObjectAddresses to dependency.h but instead move only the
typedef.

--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

Attachment Content-Type Size
drop-owned-bug-2.patch text/plain 21.7 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2006-08-20 17:50:09 Re: pg_dump versus SERIAL, round N
Previous Message Tom Lane 2006-08-20 17:32:29 Re: pg_dump versus SERIAL, round N

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2006-08-20 17:56:00 Re: DROP OWNED BY doesn't work
Previous Message Tom Lane 2006-08-20 16:05:57 Re: DROP OWNED BY doesn't work