Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id 11E49119C296 for ; Thu, 8 Mar 2012 17:26:06 -0400 (AST) Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1S5kqa-0001up-RL for pgsql-bugs@postgresql.org; Thu, 08 Mar 2012 21:26:05 +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 q28LPpCv007577; Thu, 8 Mar 2012 16:25:51 -0500 (EST) To: Bill MacArthur cc: pgsql-bugs@postgresql.org Subject: Re: table row type and query-specified row type do not match In-reply-to: <4F590B2A.1030709@dhs-club.com> References: <4F590B2A.1030709@dhs-club.com> Comments: In-reply-to Bill MacArthur message dated "Thu, 08 Mar 2012 14:40:26 -0500" Date: Thu, 08 Mar 2012 16:25:51 -0500 Message-ID: <7576.1331241951@sss.pgh.pa.us> From: Tom Lane X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201203/71 X-Sequence-Number: 32632 Bill MacArthur writes: > Perhaps this issue has been resolved in higher sub-versions or in 9.1? No, seems to be just the same in HEAD :-( > In summary, the issue revolves around the data type of a column being changed, but the data type in a dependent rule on another table does not. Does the data type have to be embedded in the rule? Yeah, it does, or at least the implications of not doing so would amount to a ground-up redesign, as well as moving a lot of cycles out of rule creation and into every rule use. What I would have expected to happen is for the ALTER TABLE to throw an error telling you it couldn't cope with updating the rule, and that you'd need to fix that manually. There is such a test involving views; not sure why it's not catching this rule. regards, tom lane