From: | Kohei KaiGai <kaigai(at)kaigai(dot)gr(dot)jp> |
---|---|
To: | Dimitri Fontaine <dimitri(at)2ndquadrant(dot)fr> |
Cc: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, PgHacker <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: ALTER command reworks |
Date: | 2012-11-19 15:25:09 |
Message-ID: | CADyhKSV+DnLa1k42bAJhM_9sfmY3KkNVqTKiSuHi_RvgBCT1AA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi Dimitri,
Thanks for your checks.
2012/11/19 Dimitri Fontaine <dimitri(at)2ndquadrant(dot)fr>:
> Kohei KaiGai <kaigai(at)kaigai(dot)gr(dot)jp> writes:
>> The attached patch is the revised version of ALTER RENAME TO
>> consolidation. According to the previous suggestion, it uses
>> a common logic to check object-naming duplication at
>> check_duplicate_objectname().
>
> I think you need to better comment which object types are supported by
> the new generic function and which are not in AlterObjectRename().
>
OK, Are you suggesting to add a "generic" comments such as "Generic
function to change the name of a given object, for simple cases ...",
not a list of OBJECT_* at the head of this function, aren't you?
>> At the code path on AlterObjectNamespace_internal, it lost
>> ObjectType information to the supplied object, so I also added
>> get_object_type() function at objectaddress.c for inverse
>> translation from a couple of classId/objectId to OBJECT_* label.
>
> I don't understand that part, and it looks like it would be way better
> to find a way to pass down the information you already have earlier in
> the code than to compute it again doing syscache lookups…
>
The pain point is AlterObjectNamespace_internal is not invoked by
only ExecAlterObjectSchemaStmt(), but AlterObjectNamespace_oid()
also.
It is the reason why I had to put get_object_type() to find out OBJECT_*
from the supplied ObjectAddress, because this code path does not
available to pass down its ObjectType from the caller.
Thanks,
--
KaiGai Kohei <kaigai(at)kaigai(dot)gr(dot)jp>
From | Date | Subject | |
---|---|---|---|
Next Message | Pavel Stehule | 2012-11-19 15:25:43 | Re: gset updated patch |
Previous Message | Amit kapila | 2012-11-19 15:22:59 | Re: [WIP PATCH] for Performance Improvement in Buffer Management |