Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cvnJx-00081d-MS for pgsql-hackers@arkaria.postgresql.org; Wed, 05 Apr 2017 15:58:09 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cvnJx-0001wb-99 for pgsql-hackers@arkaria.postgresql.org; Wed, 05 Apr 2017 15:58:09 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cvnIS-0007aX-65 for pgsql-hackers@postgresql.org; Wed, 05 Apr 2017 15:56:36 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cvnIP-0007LH-Br for pgsql-hackers@postgresql.org; Wed, 05 Apr 2017 15:56:34 +0000 Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 46DAB2060A; Wed, 5 Apr 2017 11:56:32 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute7.internal (MEProxy); Wed, 05 Apr 2017 11:56:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s= fm1; bh=5/c/1LpGlB2BJWKbWDTBA/3IaQnjUYMO2jwj/JBMumI=; b=iRL8l78Z cTkjoqdUES+iT27IsWKB0TMnpFWHe0Qr0AJ+4SPlS3s0LuCOrYSEAt7OaFeKRtGe 5xungT/XfJK84NDn1u36tUwBy1lm++amXziYWiz0h4TMfIFq3luwGaeYWkdxBGgL X9htvbJjhcXNvfhcg3cI26d8rpmdR9ksTD2rY+lGUuVwnqZltTf/nuzPA3S4Anpj v7dT7XPG3WQFubHAoGxmfwrFR6k3n+qwjHgbTF4x5gq+e7dfanoFxydNNdXiYxvu edvU+IjvwrVxUnhr2EBn62+VAhoE1d7Q6616IDTKcMLmCdDCljOQZjgYsOPGOD5V xXZ3E41EeXw+kA== X-ME-Sender: X-Sasl-enc: V8PekueM85wCmOVZqeXPA/lKr9tYHNGd9847t5wlF1iQ 1491407792 Received: from april.local (c-73-13-66-39.hsd1.pa.comcast.net [73.13.66.39]) by mail.messagingengine.com (Postfix) with ESMTPA id E343A240AE; Wed, 5 Apr 2017 11:56:31 -0400 (EDT) Subject: Re: partitioned tables and contrib/sepgsql To: Tom Lane References: <20170309144718.GE9812@tamriel.snowman.net> <81ddcddc-b9f6-9d80-19c4-c9270fc71fd5@joeconway.com> <426dde50-a6ef-d53c-0607-c0766afd6698@joeconway.com> <3b0f0a27-0ccf-7298-5365-87d685eeea42@joeconway.com> <19352.1491368287@sss.pgh.pa.us> <66233275-7be2-f34f-900a-aa4a5a93afe5@2ndquadrant.com> <20411.1491369620@sss.pgh.pa.us> Cc: Robert Haas , Joe Conway , Mike Palmiotto , Stephen Frost , "pgsql-hackers@postgresql.org" From: Peter Eisentraut Organization: 2ndQuadrant Message-ID: <2a3b192d-3e52-5611-0fa3-a1e62c7be7c1@2ndquadrant.com> Date: Wed, 5 Apr 2017 11:56:31 -0400 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <20411.1491369620@sss.pgh.pa.us> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org On 4/5/17 01:20, Tom Lane wrote: >> The complaint about bool is also just a warning. > > Really? > > $ cat test.c > typedef char bool; > typedef char bool; > $ gcc -c test.c > test.c:2: error: redefinition of typedef 'bool' > test.c:1: note: previous declaration of 'bool' was here > > This is with gcc 4.4.7. But the above is not how the current code looks. stdbool.h does #define bool _Bool c.h does #ifndef bool typedef char bool; #endif So if you get stdbool.h first, then c.h does nothing. If you get c.h first, then the macro from stdbool.h will mask the c.h typedef. Where this gets really fun is when you include other header files between, say, postgres.h and selinux/label.h, because then the function definitions from those header files will be incompatible before and after the stdbool.h inclusion. Which indeed currently leads to the following compilation error: label.c: In function ‘sepgsql_init_client_label’: label.c:437:18: error: assignment from incompatible pointer type [-Werror=incompatible-pointer-types] needs_fmgr_hook = sepgsql_needs_fmgr_hook; ^ So I can't reproduce the original complaint, but this is potentially worse. (The above is on Fedora 25. You need a fairly new selinux.) -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers