Re: ALTER OBJECT any_name SET SCHEMA name

Alvaro Herrera <alvherre@commandprompt.com>

From: Alvaro Herrera <alvherre@commandprompt.com>
To: Dimitri Fontaine <dimitri@2ndquadrant.fr>
Cc: Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>, Tom Lane <tgl@sss.pgh.pa.us>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2010-11-04T14:39:18Z
Lists: pgsql-hackers
Excerpts from Dimitri Fontaine's message of jue nov 04 11:06:48 -0300 2010:

> Also attached, please find the complete version of ALTER EXTENSION ext
> SET SCHEMA name; with support for all contrib extensions. That's the
> example that allows to see the API (AlterFooNamespace_oid and _internal
> functions) in action: that should help devising the best refactoring.

Three comments,

1. wouldn't it make more sense to save the extension namespace in the
extension catalog?

2. I think the guts of AlterExtensionNamespace (the large switch block)
should be elsewhere, probably in alter.c

3. Not this patch, but I think using "extension" as a global variable
name is a bad idea.

-- 
Álvaro Herrera <alvherre@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support