Excerpts from Tom Lane's message of vie jun 22 22:37:10 -0400 2012: > j...@pgexperts.com writes: > > DROP and CREATE extension appear to work fine, but if you ALTER EXTENSION > > postgis SET SCHEMA foo, it leaves a few relations behind. > > What it seems to be leaving behind is indexes ... also relation rowtypes. > > A bit of looking shows that ALTER EXTENSION SET SCHEMA calls > AlterObjectNamespace_oid on the table. AlterObjectNamespace_oid > calls AlterRelationNamespaceInternal, and nothing else. In comparison, > ALTER TABLE SET SCHEMA (AlterTableNamespace) calls > AlterRelationNamespaceInternal and about four other things. I'm not > sure if this was broken before the last round of refactoring in this > area, but for sure it's broken now.
Aha, I see the bug. It seems the split for AlterObjectNamespace_oid related to tables was done at the wrong level: there should be a new AlterTableNamespace_internal call that does all the extra stuff, and which is to be called from AlterObjectNamespace_oid. FWIW this bug seems to have been introduced in the initial extensions commit, d9572c4e3b474031060189050e14ef384b94e001. Prior to that we had ExecAlterObjectSchemaStmt calling AlterTableNamespace directly. -- Álvaro Herrera http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs