pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Michael Paquier <michael@paquier.xyz>
Cc: pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Refactor attribute mappings used in logical tuple conversion
Date: Wed, 18 Dec 2019 09:37:33 -0500
Message-ID: <2517.1576679853@sss.pgh.pa.us> (raw)
In-Reply-To: <20191218101338.GB325369@paquier.xyz>
References: <E1ihTiP-0001A2-Lk@gemulon.postgresql.org>
	<20191218101338.GB325369@paquier.xyz>

Michael Paquier <michael@paquier.xyz> 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





view thread (7+ messages)  latest in thread

Message-ID: <2517.1576679853@sss.pgh.pa.us>
Permalink:  ../2517.1576679853@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2517.1576679853@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, michael@paquier.xyz
  Subject: Re: pgsql: Refactor attribute mappings used in logical tuple conversion
  In-Reply-To: <2517.1576679853@sss.pgh.pa.us>
  References: <E1ihTiP-0001A2-Lk@gemulon.postgresql.org> <20191218101338.GB325369@paquier.xyz> <2517.1576679853@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox