Skip site navigation (1) Skip section navigation (2)

Re: ALTER command reworks

From: Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>
To: Kohei KaiGai <kaigai(at)kaigai(dot)gr(dot)jp>
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 14:58:10
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers

Thanks for working on that cleanup job!

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().

> 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…

Dimitri Fontaine     PostgreSQL : Expertise, Formation et Support

In response to


pgsql-hackers by date

Next:From: Alvaro HerreraDate: 2012-11-19 15:05:56
Subject: Re: Proposal for Allow postgresql.conf values to be changed via SQL
Previous:From: Karl O. PincDate: 2012-11-19 14:50:04
Subject: Re: Doc patch, put RAISE USING keywords into a table

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group