Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cJUow-0004P3-2A for pgsql-bugs@arkaria.postgresql.org; Wed, 21 Dec 2016 00:31:50 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cJUov-0005cb-Df for pgsql-bugs@arkaria.postgresql.org; Wed, 21 Dec 2016 00:31:49 +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 1cJUoG-0004sv-Pe for pgsql-bugs@postgresql.org; Wed, 21 Dec 2016 00:31:08 +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 1cJUo6-0007RU-P8 for pgsql-bugs@postgresql.org; Wed, 21 Dec 2016 00:31:07 +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 uBL0UvHr023906; Tue, 20 Dec 2016 19:30:57 -0500 From: Tom Lane To: joan@sanchezsabe.com cc: pgsql-bugs@postgresql.org Subject: Re: BUG #14470: Dropping a column produces "table row type and query-specified row type do not match" error In-reply-to: <20161220233352.25620.31226@wrigleys.postgresql.org> References: <20161220233352.25620.31226@wrigleys.postgresql.org> Comments: In-reply-to joan@sanchezsabe.com message dated "Tue, 20 Dec 2016 23:33:52 +0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <23904.1482280257.1@sss.pgh.pa.us> Date: Tue, 20 Dec 2016 19:30:57 -0500 Message-ID: <23905.1482280257@sss.pgh.pa.us> X-Pg-Spam-Score: -5.0 (-----) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org joan@sanchezsabe.com writes: > At this point, if we drop one column (not used at all by the previous > function)... > ALTER TABLE users > DROP COLUMN column_that_we_will_drop ; > ... this makes the next statement to generate an error > SELECT * FROM fun('a@b.com'); > ERROR: table row type and query-specified row type do not match > SQL state: 42804 > Detail: Query provides a value for a dropped column at ordinal position 3. > Context: SQL function "fun" statement 1 > SELECT * FROM fun('a@b.com'); I can't reproduce this in HEAD or 9.6 branch tip. I believe it was already fixed by this patch, which went in a bit after 9.6.1: https://git.postgresql.org/gitweb/?p=postgresql.git&a=commitdiff&h=f4d865f22 But thanks for the report! regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs