Re: DROP OWNED BY doesn't work
| От | Tom Lane |
|---|---|
| Тема | Re: DROP OWNED BY doesn't work |
| Дата | |
| Msg-id | 28996.1156096560@sss.pgh.pa.us обсуждение |
| Ответ на | Re: DROP OWNED BY doesn't work (Alvaro Herrera <alvherre@commandprompt.com>) |
| Список | 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 по дате отправления: