Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from ) id 1jH8kc-00019W-JH for pgsql-hackers@arkaria.postgresql.org; Wed, 25 Mar 2020 16:19:30 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1jH8jd-00011m-1N for pgsql-hackers@arkaria.postgresql.org; Wed, 25 Mar 2020 16:18:29 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1jH8jc-00011f-LF for pgsql-hackers@lists.postgresql.org; Wed, 25 Mar 2020 16:18:28 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jH8ja-0000Xe-8J for pgsql-hackers@lists.postgresql.org; Wed, 25 Mar 2020 16:18:27 +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 02PGIMk9032025; Wed, 25 Mar 2020 12:18:22 -0400 From: Tom Lane To: Thomas Munro cc: Andres Freund , Amit Kapila , Michael Paquier , Julien Rouhaud , Masahiko Sawada , PostgreSQL Hackers Subject: Re: Missing errcode() in ereport In-reply-to: <28622.1585114797@sss.pgh.pa.us> References: <32174.1584454158@sss.pgh.pa.us> <20200319175902.vjib2tslosw65iyr@alap3.anarazel.de> <5063.1584641224@sss.pgh.pa.us> <20200319230446.lxjybufdcgwaqkhj@alap3.anarazel.de> <5995.1584660775@sss.pgh.pa.us> <20200320015908.ajxneh4jx6avqegv@alap3.anarazel.de> <9966.1584671550@sss.pgh.pa.us> <20200320045637.n3xo6gcmbqcg42tq@alap3.anarazel.de> <15922.1584715221@sss.pgh.pa.us> <31649.1584998689@sss.pgh.pa.us> <20200324193834.dojfetuxqupii577@alap3.anarazel.de> <6677.1585081791@sss.pgh.pa.us> <28622.1585114797@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Wed, 25 Mar 2020 01:39:57 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <32023.1585153102.1@sss.pgh.pa.us> Date: Wed, 25 Mar 2020 12:18:22 -0400 Message-ID: <32024.1585153102@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk I wrote: > Thomas Munro writes: >> I think this caused anole to say: >> "reloptions.c", line 1362: error #2042: operand types are incompatible >> ("void" and "int") >> errdetail_internal("%s", _(optenum->detailmsg)) : 0)); > Yeah, I was just looking at that :-( > We could revert the change to have these functions return void, > or we could run around and change the places with this usage > pattern to use "(void) 0" instead of just "0". The latter would > be somewhat painful if only minority compilers warn, though. > Also, I don't think that having to change ereport usage was part > of the agreed-to plan here ... so I'm leaning to the former. Done that way. regards, tom lane