Re: ALTER TABLE OWNER: change indexes

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: ALTER TABLE OWNER: change indexes
Дата
Msg-id 12921.1014590587@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: ALTER TABLE OWNER: change indexes  (Neil Conway <nconway@klamath.dyndns.org>)
Ответы Re: ALTER TABLE OWNER: change indexes  (Peter Eisentraut <peter_e@gmx.net>)
Re: ALTER TABLE OWNER: change indexes  (Neil Conway <nconway@klamath.dyndns.org>)
Список pgsql-patches
BTW, I forgot to inquire about *why* you needed to look up a relation
name.  As things stand I think you've coded it okay, but this will need
to change for schemas: a relation name isn't going to be a unique
identifier much longer.

It'd probably be best to redesign the ALTER TABLE routines so that
the recursive execution routine accepts a relation OID rather than a
relation name, with a front-end routine that does a one-time name-to-
OID lookup.  Recursion using OID will be simpler than recursion using
name, for both child-table and index cases.  And it won't break for
schemas.

Perhaps this could be done as part of the overall refactoring of the
ALTER code that someone (I forget who) was going to look at doing.

This doesn't need to be done just to make this patch acceptable, but
I thought I'd better mention that it needs to be done soon.

Another point that maybe does need immediate attention: as coded,
reassignment of ownership of a table won't affect the associated
TOAST table, if any.  Should it?

            regards, tom lane

В списке pgsql-patches по дате отправления:

Предыдущее
От: Neil Conway
Дата:
Сообщение: Re: ALTER TABLE OWNER: change indexes
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: ALTER TABLE OWNER: change indexes