Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1duoV8-0005rp-Hx for pgsql-hackers@arkaria.postgresql.org; Wed, 20 Sep 2017 23:33:54 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1duoV7-0003OJ-W8 for pgsql-hackers@arkaria.postgresql.org; Wed, 20 Sep 2017 23:33:54 +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 1duoTa-0000h3-0R for pgsql-hackers@postgresql.org; Wed, 20 Sep 2017 23:32:18 +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 1duoTN-0000cA-3T for pgsql-hackers@postgresql.org; Wed, 20 Sep 2017 23:32:17 +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 v8KNW2Sd007801; Wed, 20 Sep 2017 19:32:02 -0400 From: Tom Lane To: Andrew Dunstan cc: Michael Paquier , PostgreSQL-development Subject: Re: Windows warnings from VS 2017 In-reply-to: <7cabcef8-c2eb-f7d1-e4a2-63b93115b75c@2ndQuadrant.com> References: <7cabcef8-c2eb-f7d1-e4a2-63b93115b75c@2ndQuadrant.com> Comments: In-reply-to Andrew Dunstan message dated "Wed, 20 Sep 2017 18:49:10 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <7799.1505950322.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Wed, 20 Sep 2017 19:32:02 -0400 Message-ID: <7800.1505950322@sss.pgh.pa.us> 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 Andrew Dunstan writes: > On 09/20/2017 06:13 PM, Michael Paquier wrote: >> Those are around for some time, see here: >> https://www.postgresql.org/message-id/CAB7nPqTkW=3Db_1JVvYWd_G0WrKOT+4uF= QjGGrv8osQbUZzXGXdA@mail.gmail.com >> But there has been no actual agreement about how to fix them.. > Oh. Missed that. > My solution was going to be slightly different. I was going to enclose > the #ifdef'd code in a bare block and move the rte declaration inside > that block. Of the various solutions proposed in the previous thread, I think the most salable alternative is probably ilmari's: get rid of the variable and write the assert like Assert(planner_rt_fetch(rel->relid, root)->rtekind =3D=3D RTE_SUBQUERY); That's a pretty minimal change and it doesn't add any cycles to the non-Assert case. regards, tom lane --=20 Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers