Re: partitioned tables and contrib/sepgsql - Mailing list pgsql-hackers

From Mike Palmiotto
Subject Re: partitioned tables and contrib/sepgsql
Date
Msg-id CAMN686F8FRz80jhs5e55oTLuAg-HhdcDPhJkjBDCfc8cc6OGLA@mail.gmail.com
Whole thread Raw
In response to Re: partitioned tables and contrib/sepgsql  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
On Fri, Mar 31, 2017 at 8:23 PM, Robert Haas <robertmhaas@gmail.com> wrote:
> On Fri, Mar 31, 2017 at 2:14 PM, Mike Palmiotto
> <mike.palmiotto@crunchydata.com> wrote:
>> Attached you will find two patches, which were rebased on master as of
>> 156d388 (applied with `git am --revert [patch file]`). The first gets
>> rid of some pesky compiler warnings and the second implements the
>> sepgsql handling of partitioned tables.
>
> 0001 has the problem that we have a firm rule against putting any
> #includes whatsoever before "postgres.h".  This stdbool issue has come
> up before, though, and I fear we're going to need to do something
> about it.

Yeah, I recall this rule. The only things I can really think of to
solve the problem are:
1) #define _STDBOOL_H in postgres's c.h once bool and the like have
been defined, so we can avoid re-definition.
2) Enforce that any code utilizing the stdbool header manage the
re-definition with some combination of #undef/#define/#typedef and
document the issue somewhere.

I'd be more inclined to believe 2) is the correct solution, since 1)
is more of a hack than anything.

Thoughts?

>
> 0002 looks extremely straightforward, but I wonder if we could get one
> of the people on this list who knows about sepgsql to have a look?
> (Stephen Frost, Joe Conway, KaiGai Kohei...)

I welcome any and all feedback.

Thanks,
-- 
Mike Palmiotto
Software Engineer
Crunchy Data Solutions
https://crunchydata.com



pgsql-hackers by date:

Previous
From: Stephen Frost
Date:
Subject: Re: Rewriting the test of pg_upgrade as a TAP test
Next
From: Kevin Grittner
Date:
Subject: Re: delta relations in AFTER triggers