Re: BUG #6704: ALTER EXTENSION postgis SET SCHEMA leaves dangling relations

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: BUG #6704: ALTER EXTENSION postgis SET SCHEMA leaves dangling relations
Дата
Msg-id 1346425015-sup-3266@alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: BUG #6704: ALTER EXTENSION postgis SET SCHEMA leaves dangling relations  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: BUG #6704: ALTER EXTENSION postgis SET SCHEMA leaves dangling relations
Список pgsql-bugs
Excerpts from Tom Lane's message of vie jun 22 22:37:10 -0400 2012:
> jeff@pgexperts.com writes:
> > DROP and CREATE extension appear to work fine, but if you ALTER EXTEN=
SION
> > postgis SET SCHEMA foo, it leaves a few relations behind.
>=20
> What it seems to be leaving behind is indexes ... also relation rowtype=
s.
>=20
> 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.

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

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #6758: ./configure script sets HAVE_WCSTOMBS_L 1
Следующее
От: Andrew Hastie
Дата:
Сообщение: Re: BUG #6758: ./configure script sets HAVE_WCSTOMBS_L 1