Re: DROP OWNED BY doesn't work - Mailing list pgsql-patches

From Tom Lane
Subject Re: DROP OWNED BY doesn't work
Date
Msg-id 28996.1156096560@sss.pgh.pa.us
Whole thread Raw
In response to Re: DROP OWNED BY doesn't work  (Alvaro Herrera <alvherre@commandprompt.com>)
List pgsql-patches
Alvaro Herrera <alvherre@commandprompt.com> writes:
> 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.

Looks pretty reasonable, except if you're going to do the latter I'd
suggest just having new_object_addresses() and free_object_addresses()
and getting rid of the init/term API for having the structs on the
stack.  The latter is saving one palloc/pfree per deletion cycle, which
is a pretty silly micro-optimization really given everything else that's
going to happen to perform the delete.  It was OK when there wasn't any
reason to do otherwise, but I can't see maintaining it in parallel with a
version that does the extra palloc/pfree, and especially not adding a
bool to the struct to support having both ...

Please fix that bit and apply.

            regards, tom lane

pgsql-patches by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: DROP OWNED BY doesn't work
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] [PATCH] Provide 8-byte transaction IDs to