Re: ALTER command reworks

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: ALTER command reworks
Дата
Msg-id 20130117215903.GC4033@alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: ALTER command reworks  (Kohei KaiGai <kaigai@kaigai.gr.jp>)
Ответы Re: ALTER command reworks  (Kohei KaiGai <kaigai@kaigai.gr.jp>)
Re: ALTER command reworks  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Kohei KaiGai escribió:

> This attached patch is the rebased one towards the latest master branch.

Great, thanks.  I played with it a bit and it looks almost done to me.
The only issue I can find is that it lets you rename an aggregate by
using ALTER FUNCTION, which is supposed to be forbidden.  (Funnily
enough, renaming a non-agg function with ALTER AGGREGATE does raise an
error).  Didn't immediately spot the right place to add a check.

I think these two error cases ought to have regression tests of their
own.

I attach a version with my changes.

> I noticed that your proposed design also allows to unify ALTER code of
> OPERATOR CLASS / FAMILY; that takes index access method for its
> namespace in addition to name and namespace.

Yeah, I had noticed that and was planning on implementing it later.
Thanks for saving me the work.

> So, AlterObjectRename_internal and AlterObjectNamespace_internal have
> four of special case handling to check name / namespace conflict.

Right.  (I wonder if it would make sense to encapsulate all those checks
in a single function for both to call.)

> The latest master lookups syscache within special case handing block
> as follows:
> [code]
>
> But, we already pulls a relevant tuple from syscache on top of
> AlterObjectNamespace_internal. So, I removed cache lookup code here.

Silly me.  Thanks.

--
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

Вложения

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

Предыдущее
От: Dimitri Fontaine
Дата:
Сообщение: Re: Event Triggers: adding information
Следующее
От: Andres Freund
Дата:
Сообщение: Re: Re: Slave enters in recovery and promotes when WAL stream with master is cut + delay master/slave