Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1csw7L-0007In-PL for pgsql-hackers@arkaria.postgresql.org; Tue, 28 Mar 2017 18:45:19 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1csw7L-0001vA-AR for pgsql-hackers@arkaria.postgresql.org; Tue, 28 Mar 2017 18:45:19 +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 1csw5o-0005Fz-AK for pgsql-hackers@postgresql.org; Tue, 28 Mar 2017 18:43:44 +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 1csw5l-0003mY-Ek for pgsql-hackers@postgresql.org; Tue, 28 Mar 2017 18:43:43 +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 v2SIhcar019026; Tue, 28 Mar 2017 14:43:38 -0400 From: Tom Lane To: Andres Freund cc: pgsql-hackers@postgresql.org Subject: Re: Protection lost in expression eval changeover In-reply-to: <20170328181324.e47nypa4vqg3dpk4@alap3.anarazel.de> References: <16803.1490723570@sss.pgh.pa.us> <20170328181324.e47nypa4vqg3dpk4@alap3.anarazel.de> Comments: In-reply-to Andres Freund message dated "Tue, 28 Mar 2017 11:13:24 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <19024.1490726618.1@sss.pgh.pa.us> Date: Tue, 28 Mar 2017 14:43:38 -0400 Message-ID: <19025.1490726618@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) 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 Andres Freund writes: > On 2017-03-28 13:52:50 -0400, Tom Lane wrote: >> So it seems like we are missing some needed protection. I'm inclined >> to think that it'd be all right to just throw an error immediately in >> CheckVarSlotCompatibility if the target column is dropped. > Hm - so far we've pretty widely only set columns to NULL in that > case. You don't see concerns with triggering errors in cases we > previously hadn't? Well, in principle these errors ought to be unreachable at all; they're only there to backstop any possible failure to notice stale plans. I don't see a strong reason why we need to allow a dropped column to go to null while we throw an immediate error for a change in column type. (If there is some reason, hopefully beta testing will find it.) > I wonder if it'd not be better to add a branch to slot_deform_tuple's > main loop like Much rather not do that. 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