Re: DROP OWNED BY doesn't work

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

Alvaro Herrera <alvherre(at)commandprompt(dot)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

In response to

Browse pgsql-hackers by date

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

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2006-08-20 21:33:01 Re: [HACKERS] [PATCH] Provide 8-byte transaction IDs to
Previous Message Alvaro Herrera 2006-08-20 17:37:44 Re: DROP OWNED BY doesn't work