Re: REASSIGN OWNED lacks support for FDWs

Поиск
Список
Период
Сортировка
Искать
От
Robert Haas
Тема
Re: REASSIGN OWNED lacks support for FDWs
Дата
Msg-id
CA+TgmoZh-HEncWr_EZvz3kH3qMMv+m7VvrCkbaPTw2GiUF5QaQ@mail.gmail.com
Ответ на
Список
Дерево обсуждения
REASSIGN OWNED lacks support for FDWs Tom Lane <tgl@sss.pgh.pa.us>
Re: REASSIGN OWNED lacks support for FDWs Robert Haas <robertmhaas@gmail.com>
Re: REASSIGN OWNED lacks support for FDWs Tom Lane <tgl@sss.pgh.pa.us>
Re: REASSIGN OWNED lacks support for FDWs Alvaro Herrera <alvherre@commandprompt.com>
Re: REASSIGN OWNED lacks support for FDWs Alvaro Herrera <alvherre@commandprompt.com>
Re: REASSIGN OWNED lacks support for FDWs Tom Lane <tgl@sss.pgh.pa.us>
Re: REASSIGN OWNED lacks support for FDWs Alvaro Herrera <alvherre@commandprompt.com>
Re: REASSIGN OWNED lacks support for FDWs Etsuro Fujita <fujita.etsuro@lab.ntt.co.jp>
Re: REASSIGN OWNED lacks support for FDWs Alvaro Herrera <alvherre@commandprompt.com>
Re: REASSIGN OWNED lacks support for FDWs Etsuro Fujita <fujita.etsuro@lab.ntt.co.jp>
On Wed, Feb 15, 2012 at 12:58 PM, Tom Lane  wrote:
> As per http://archives.postgresql.org/pgsql-general/2012-02/msg00304.php
> there is no switch case in shdepReassignOwned for foreign data wrappers.
>
> The obvious short-term answer (and probably the only back-patchable one)
> is to add a case for that object type.  But after all the refactoring
> that's been done in the general area of this type of command, I'm a bit
> surprised that shdepReassignOwned still looks like this.  Can't we merge
> this knowledge into someplace where it doesn't have to be maintained
> separately?

Hmm.  I guess we could add function pointers to the ObjectProperty
array in objectaddress.c.  Then we could just search the array for the
catalog ID and call the associated function through the function
pointer, rather than having a switch in shdepReassignOwned().  Since
anyone adding a new object type ought to be looking at objectaddress.c
anyway, that would be one less place for people to forget to update.

However, I'm not 100% sure that's an improvement.  Switches by object
type are probably not going to go away...

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

В списке pgsql-hackers по дате отправления
От: Tom Lane
Дата:
От: Tom Lane
Дата:
FAQ