ALTER command reworks

Поиск
Список
Период
Сортировка
От Kohei KaiGai
Тема ALTER command reworks
Дата
Msg-id CADyhKSXFfP7zXG_0RJxvViZHcRQAq2LXv7KL1b6wpAOAKOg9gg@mail.gmail.com
обсуждение исходный текст
Ответы Re: ALTER command reworks  (Kohei KaiGai <kaigai@kaigai.gr.jp>)
Список pgsql-hackers
The attached patch is my homework at the last commit fest of v9.2.

It consolidates some similar routines into a single generic routines
that handles ALTER RENAME TO, OWNER TO and SET SCHEMA
according to the ObjectProperty in objectaddress.c, but here is
no functionality enhancement.

As existing AlterObjectNamespace() doing, this generic routine
handles only case when a catalog entry is updated without any
extra permission checks or other stuffs.
Thus, RenameSchema was not consolidated due to CREATE
permission checks towards the database, for example.

As patched chunk in commands/alter.c shows, 13 of special
routines were consolidated into AlterObjectRename, 16 of
special ones were consolidated into AlterObjectNamespace,
and 20 of special ones were consolidated into AlterObjectOwner().

My motivation is for minimization of number of places to put
object-access-hook around alter statement. Probably, it shall
be located around or just after simple_heap_update().
This is a groundwork towards ALTER command support in
sepgsql module.

Thanks,
--
KaiGai Kohei <kaigai@kaigai.gr.jp>

Вложения

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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: isolation check takes a long time
Следующее
От: Tom Lane
Дата:
Сообщение: Re: isolation check takes a long time