Thread: BUG #11344: ALTER TABLE ... SET SCHEMA ... do not recurse to inherited tables
BUG #11344: ALTER TABLE ... SET SCHEMA ... do not recurse to inherited tables
From
bashtanov@imap.cc
Date:
The following bug has been logged on the website: Bug reference: 11344 Logged by: Alexey Bashtanov Email address: bashtanov@imap.cc PostgreSQL version: 9.3.4 Operating system: CentOS Linux Description: Hello! I perform the following actions 1) ALTER TABLE foo SET SCHEMA zzz 2) ALTER TABLE bar * SET SCHEMA zzz and expect the tables inherited from foo and bar to be moved to schema zzz as well as the master tables. My expectations are based on docs: http://www.postgresql.org/docs/9.3/static/sql-altertable.html However, only master tables are moved to zzz schema. Please fix either the code or the docs. Regards, Alexey Bashtanov
Re: BUG #11344: ALTER TABLE ... SET SCHEMA ... do not recurse to inherited tables
From
Heikki Linnakangas
Date:
On 09/03/2014 03:35 PM, bashtanov@imap.cc wrote: > The following bug has been logged on the website: > > Bug reference: 11344 > Logged by: Alexey Bashtanov > Email address: bashtanov@imap.cc > PostgreSQL version: 9.3.4 > Operating system: CentOS Linux > Description: > > Hello! > > I perform the following actions > 1) ALTER TABLE foo SET SCHEMA zzz > 2) ALTER TABLE bar * SET SCHEMA zzz > and expect the tables inherited from foo and bar to be moved to schema zzz > as well as the master tables. My expectations are based on docs: > http://www.postgresql.org/docs/9.3/static/sql-altertable.html > > However, only master tables are moved to zzz schema. Please fix either the > code or the docs. The manual says: > > SET SCHEMA > > This form moves the table into another schema. Associated indexes, constraints, and sequences owned by table columnsare moved as well. It doesn't mention inherited tables at all. ? - Heikki
Re: BUG #11344: ALTER TABLE ... SET SCHEMA ... do not recurse to inherited tables
From
Matheus de Oliveira
Date:
On Wed, Sep 3, 2014 at 9:35 AM, <bashtanov@imap.cc> wrote: > 1) ALTER TABLE foo SET SCHEMA zzz > 2) ALTER TABLE bar * SET SCHEMA zzz > I think one confusion is that the command (2) and: ALTER TABLE ONLY baz SET SCHEMA zzz; are accepted. If SET SCHEMA does nothing about inherited table, why does it accept ONLY and "*" ? Which are not accepted syntax from the docs. Regards, --=20 Matheus de Oliveira Analista de Banco de Dados Dextra Sistemas - MPS.Br n=C3=ADvel F! www.dextra.com.br/postgres