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.89) (envelope-from ) id 1ihaSJ-0007Tb-1t for pgsql-committers@arkaria.postgresql.org; Wed, 18 Dec 2019 14:37:39 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ihaSH-0002V7-O4 for pgsql-committers@arkaria.postgresql.org; Wed, 18 Dec 2019 14:37:37 +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 1ihaSH-0002SK-Cv for pgsql-committers@lists.postgresql.org; Wed, 18 Dec 2019 14:37:37 +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 1ihaSE-0000pI-Hh for pgsql-committers@lists.postgresql.org; Wed, 18 Dec 2019 14:37:36 +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 xBIEbXw1002518; Wed, 18 Dec 2019 09:37:33 -0500 From: Tom Lane To: Michael Paquier cc: pgsql-committers@lists.postgresql.org Subject: Re: pgsql: Refactor attribute mappings used in logical tuple conversion In-reply-to: <20191218101338.GB325369@paquier.xyz> References: <20191218101338.GB325369@paquier.xyz> Comments: In-reply-to Michael Paquier message dated "Wed, 18 Dec 2019 19:13:38 +0900" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2516.1576679853.1@sss.pgh.pa.us> Date: Wed, 18 Dec 2019 09:37:33 -0500 Message-ID: <2517.1576679853@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Michael Paquier writes: > Hmm. All buildfarm members are happy with this change, except > prairiedog which is picky about the part in rewriteManip.h It's not only prairiedog --- my RHEL6 workstation (gcc 4.4.7) is failing as well, and I see buildfarm member grouse is unhappy too. > In file included from index.c:66: > ../../../src/include/rewrite/rewriteManip.h:20: error: redefinition of > typedef 'AttrMap' This is simply the wrong way to do it. What you have to do, if you want to not include attmap.h here, is to say struct AttrMap; (no typedef) and then refer to it as "struct AttrMap" in the rest of the header file. There are lots of other examples in our headers. BTW, it's also conventional to add a comment saying "this is to avoid including foo.h", or equivalent. TBH, though, I wonder if this doesn't indicate you've put this function in the wrong header to begin with. Why does it belong in rewriteManip? regards, tom lane