Re: pgsql: Add support for coordinating record typmods among parallel worke

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>
Cc: Andres Freund <andres(at)anarazel(dot)de>, pgsql-committers <pgsql-committers(at)postgresql(dot)org>
Subject: Re: pgsql: Add support for coordinating record typmods among parallel worke
Date: 2017-09-15 03:45:20
Message-ID: 14932.1505447120@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com> writes:
> My compiler, C++ and more recent C standards are OK with identical
> redefinition of a typedef like that, but not the older standards or
> those particular compilers. D'oh. (I should figure out how to make
> my automatic patch tester this fussy). I think we should probably
> just do this:

Our usual locution for this sort of thing is to use
"struct SharedRecordTypmodRegistry" in headers instead of
the typedef name, if we don't want to pull in the header
where the typedef is defined. It might be all right to do
what you suggest, but we've been burnt in the past by circular
dependencies and/or pulling some header into essentially
the entire build (which tends to lead to a mess down the road).
I'd generally lean in the direction of not adding #includes to
header files except where absolutely necessary.

regards, tom lane

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Andres Freund 2017-09-15 04:11:58 Re: pgsql: Add support for coordinating record typmods among parallel worke
Previous Message Thomas Munro 2017-09-15 03:38:09 Re: pgsql: Add support for coordinating record typmods among parallel worke

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2017-09-15 04:11:58 Re: pgsql: Add support for coordinating record typmods among parallel worke
Previous Message Thomas Munro 2017-09-15 03:38:09 Re: pgsql: Add support for coordinating record typmods among parallel worke