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

Re: ALTER command reworks

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Kohei KaiGai <kaigai(at)kaigai(dot)gr(dot)jp>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: ALTER command reworks
Date: 2012-10-02 14:19:17
Message-ID: 1349187206-sup-5566@alvh.no-ip.org (view raw or flat)
Thread:
Lists: pgsql-hackers
Excerpts from Alvaro Herrera's message of vie sep 28 18:17:32 -0300 2012:
> Excerpts from Kohei KaiGai's message of lun sep 10 08:08:32 -0300 2012:
> 
> > As attached, I split off the original one into three portions; for set-schema,
> > set-owner and rename-to. Please apply them in order of patch filename.
> 
> Hmm, in the first patch, it seems to me we can simplify
> AlterObjectNamespace's signature: instead of passing all the details of
> the object class (cache Ids and attribute numbers and so on), just do
> 
> AlterObjectNamespace(catalog-containing-object, objectId, newNamespaceOid)

Like in the attached reworked version, in which I renamed the function
to AlterObjectNamespace_internal because the other name seemed a bit
wrong in the fact of the existing AlterObjectNamespace_oid.

I also made the ALTER FUNCTION case go through
AlterObjectNamespace_internal; it seems pointless to have a separate
code path to go through when the generic one does just fine (also, this
makes functions identical to collations in implementation).  That's one
less hook point for sepgsql, I guess.

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

Attachment: pgsql-v9.3-alter-reworks.1-schema.v4.patch
Description: application/octet-stream (43.0 KB)

In response to

Responses

pgsql-hackers by date

Next:From: Phil SorberDate: 2012-10-02 14:47:27
Subject: Missing OID define
Previous:From: Scott CorscaddenDate: 2012-10-02 13:41:50
Subject: MVCC and large objects

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