Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cPapc-0003LH-SB for pgsql-hackers@arkaria.postgresql.org; Fri, 06 Jan 2017 20:09:44 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cPapc-0002zY-CM for pgsql-hackers@arkaria.postgresql.org; Fri, 06 Jan 2017 20:09:44 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cPaoC-0001Il-A6 for pgsql-hackers@postgresql.org; Fri, 06 Jan 2017 20:08:16 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cPao4-0008Te-OM for pgsql-hackers@postgresql.org; Fri, 06 Jan 2017 20:08:15 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id v06K85NT020692; Fri, 6 Jan 2017 15:08:05 -0500 From: Tom Lane To: Alvaro Herrera cc: Justin Pryzby , Robert Haas , "pgsql-hackers@postgresql.org" Subject: Re: ALTER TABLE .. ALTER COLUMN .. ERROR: attribute .. has wrong type In-reply-to: <20170106194417.pkxd4nmkaqkrvz7j@alvherre.pgsql> References: <20170106194417.pkxd4nmkaqkrvz7j@alvherre.pgsql> Comments: In-reply-to Alvaro Herrera message dated "Fri, 06 Jan 2017 16:44:17 -0300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <20690.1483733285.1@sss.pgh.pa.us> Date: Fri, 06 Jan 2017 15:08:05 -0500 Message-ID: <20691.1483733285@sss.pgh.pa.us> X-Pg-Spam-Score: -5.1 (-----) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Alvaro Herrera writes: > Alvaro Herrera wrote: >> Here's a first attempt at fixing this. It makes the test pass, but I >> have the feeling that more complex ones might need more work. > Here's another one with three main differences: Hmm. The bespoke code for constructing the attno map bothers me; surely there is existing code that does that? If not, it'd still make more sense to factor it out, I think, because there will be other needs for it in future. Otherwise, this seems sound in terms of fixing the observed problem, but what are the implications for event triggers exactly? Does a trigger see only the original expression, or only the modified expression, or ??? regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers