Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id F33EAFBD25B for ; Thu, 26 Apr 2012 20:04:51 -0300 (ADT) Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SNXjx-0002aZ-5D for pgsql-bugs@postgresql.org; Thu, 26 Apr 2012 23:04:51 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id q3QN4UJN016644; Thu, 26 Apr 2012 19:04:30 -0400 (EDT) To: Ryan Kelly cc: pgsql-bugs@postgresql.org Subject: Re: ALTER TABLE ... OWNER TO does not change ownership recursively In-reply-to: <20120426114232.GA31886@llserver.lakeliving.com> References: <20120426114232.GA31886@llserver.lakeliving.com> Comments: In-reply-to Ryan Kelly message dated "Thu, 26 Apr 2012 07:42:32 -0400" Date: Thu, 26 Apr 2012 19:04:30 -0400 Message-ID: <16643.1335481470@sss.pgh.pa.us> From: Tom Lane X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201204/166 X-Sequence-Number: 32917 Ryan Kelly writes: > It seems that ALTER TABLE ... OWNER TO does not change the ownership of > any inheriting tables. The documentation states: >> If ONLY is specified, only that table is altered. If ONLY is not >> specified, the table and any descendant tables are altered. If you read further (down in the Notes section of the ALTER TABLE page), you'll find The TRIGGER, CLUSTER, OWNER, and TABLESPACE actions never recurse to descendant tables; that is, they always act as though ONLY were specified. So it is operating as intended and documented. If we were starting from a green field I'd question whether these exceptions were a good idea, but at this point changing the behavior seems more likely to break user code than to help people. (In particular, the possible consequences for reloading old dump files seem a bit scary, since pg_dump emits lots of ALTER OWNER commands.) regards, tom lane