Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id 31B2C1B505F0 for ; Wed, 14 Mar 2012 15:19:30 -0300 (ADT) Received: from smtp-out-02.xnet.hr ([83.139.103.74] helo=smtp.xnet.hr) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1S7snH-0007ec-SG for pgsql-bugs@postgresql.org; Wed, 14 Mar 2012 18:19:29 +0000 Received: from jimmy.bnet.hr (jimmy.bnet.hr [83.139.80.2]) by smtp.xnet.hr (XnetMailOut) with ESMTP id BA5968A3E7; Wed, 14 Mar 2012 19:19:11 +0100 (CET) Received: from smtp.xnet.hr ([83.139.103.71]) by jimmy.bnet.hr (avcleaner-a.mx.xnet.hr [83.139.80.2]) (XNet AV Scanner, port 10026) with ESMTP id 6ZoumsowkQ1P; Wed, 14 Mar 2012 19:18:56 +0100 (CET) Received: from [109.60.101.251] (unknown [109.60.101.251]) by smtp.xnet.hr (XnetMailOut) with ESMTP id 09E8A4800A; Wed, 14 Mar 2012 19:18:55 +0100 (CET) Message-ID: <4F60E122.3080409@zg.htnet.hr> Date: Wed, 14 Mar 2012 19:19:14 +0100 From: Rikard Pavelic User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20111105 Thunderbird/8.0 MIME-Version: 1.0 To: Merlin Moncure CC: pgsql-bugs@postgresql.org Subject: Re: BUG #6489: Alter table with composite type/table References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -0.8 (/) X-Archive-Number: 201203/109 X-Sequence-Number: 32670 On 13.3.2012. 20:49, Merlin Moncure wrote: > I personally think it's an oversight. This was just discussed a > couple of days ago here: > http://postgresql.1045698.n5.nabble.com/Altering-a-table-with-a-rowtype-column-td5544844.html > > The server is blocking the alter-not-null-with-default because it's > assuming that the default should be applied to dependent (foreign) > tables implementing the type as a field. I think this assumption is > totally bogus because composite types defaults get applied to the > type, not to member fields and therefore a default has no meaning in > that context. I think the TODO should read to relax the check > essentially. > > merlin > I agree. TODO: alter table-type columns according to attribute type rules. Enforce only TYPE features and ignore TABLE features when altering composite table-types. While I'm making up TODO's, my favorite one: support recursive types. Regards, Rikard