Re: ALTER OBJECT any_name SET SCHEMA name - Mailing list pgsql-hackers

From Robert Haas
Subject Re: ALTER OBJECT any_name SET SCHEMA name
Date
Msg-id AANLkTim3AGy1dR=6QLPo-vRx0xQfTn7YCTyQjTGc6KfB@mail.gmail.com
Whole thread Raw
In response to Re: ALTER OBJECT any_name SET SCHEMA name  (Dimitri Fontaine <dimitri@2ndQuadrant.fr>)
Responses Re: ALTER OBJECT any_name SET SCHEMA name
List pgsql-hackers
On Thu, Nov 4, 2010 at 3:39 PM, Dimitri Fontaine <dimitri@2ndquadrant.fr> wrote:
> Tom Lane <tgl@sss.pgh.pa.us> writes:
>> Not having read the patch, but ... the idea that was in the back of
>> my mind was to have a generic AlterObjectNamespace function that
>> would take parameters approximately like the following:
>
> Please find attached what I came up with, that's the set_schema patch
> version 6.

Looks good overall, but:

In AlterObjectNamespace(), you reference ACL_KIND_CONVERSION, which I
suspect actually needs to be yet another parameter to that function.
I've had the thought before that we have a deplorable number of
different ways of referring to object types in the back end:
ACL_KIND_*, OCLASS_*, OBJECT_*, and class IDs.  We should maybe look
at unifying some or all of those.

getObjectDescriptionOids() needs a prototype somewhere.

And probably most significantly, you need to add docs and regression tests.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Fwd: patch: format function - fixed oid
Next
From: Robert Haas
Date:
Subject: Re: ALTER OBJECT any_name SET SCHEMA name