Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bIzVT-0003Y8-An for pgsql-bugs@arkaria.postgresql.org; Fri, 01 Jul 2016 14:33:23 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bIzVS-0007Md-RD for pgsql-bugs@arkaria.postgresql.org; Fri, 01 Jul 2016 14:33:22 +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 1bIzUp-0006ey-UC for pgsql-bugs@postgresql.org; Fri, 01 Jul 2016 14:32:43 +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 1bIzUi-00056m-Kw for pgsql-bugs@postgresql.org; Fri, 01 Jul 2016 14:32: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 u61EWXoV018869; Fri, 1 Jul 2016 10:32:33 -0400 From: Tom Lane To: Michael Paquier cc: Thomas Munro , christopher.m.hanks@gmail.com, PostgreSQL Bugs Subject: Re: BUG #14220: pg_get_expr() with an incorrect relation id crashes the server In-reply-to: References: <20160629224349.1407.32667@wrigleys.postgresql.org> Comments: In-reply-to Michael Paquier message dated "Fri, 01 Jul 2016 10:12:06 +0900" Date: Fri, 01 Jul 2016 10:32:33 -0400 Message-ID: <18868.1467383553@sss.pgh.pa.us> X-Pg-Spam-Score: -3.2 (---) 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 Michael Paquier writes: > I have poked at this bug report yesterday and today, and found that it > is as well possible to hit the second assertion two lines below with a > dropped column. So I would like to propose the patch attached to > replace both assertions with an elog(ERROR). There's a quite similar error check just a few lines above that prints elog(ERROR, "bogus varattno for subquery var: %d", var->varattno); I'm not necessarily wedded to that exact phrasing, but I think these new error messages should be consistent with that one. I'm a bit inclined to make all three of them read like elog(ERROR, "invalid attnum %d for table \"%s\"", attnum, rte->eref->aliasname); > Test cases are included, > though I am not sure if they bring much value. Yeah, I can't get very excited about memorializing those. 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