Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cF47H-0002Qt-Da for pgsql-hackers@arkaria.postgresql.org; Thu, 08 Dec 2016 19:12:27 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cF47G-0007sS-MT for pgsql-hackers@arkaria.postgresql.org; Thu, 08 Dec 2016 19:12:26 +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 1cF47G-0007sL-0P for pgsql-hackers@postgresql.org; Thu, 08 Dec 2016 19:12:26 +0000 Received: from tamriel.snowman.net ([72.66.115.51]) by makus.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cF47D-0001ut-0V for pgsql-hackers@postgresql.org; Thu, 08 Dec 2016 19:12:24 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id 961C35F7AC; Thu, 8 Dec 2016 14:11:22 -0500 (EST) Date: Thu, 8 Dec 2016 14:11:22 -0500 From: Stephen Frost To: Robert Haas Cc: "pgsql-hackers@postgresql.org" Subject: Re: [COMMITTERS] pgsql: Implement table partitioning. Message-ID: <20161208191122.GF23417@tamriel.snowman.net> References: <20161208184931.GE23417@tamriel.snowman.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="ktyc2UzNUDZzGzis" Content-Disposition: inline In-Reply-To: X-Editor: Vim http://www.vim.org/ X-Info: http://www.snowman.net X-Operating-System: Linux/3.13.0-91-generic (x86_64) X-Uptime: 14:09:27 up 152 days, 20:33, 30 users, load average: 0.09, 0.12, 0.13 User-Agent: Mutt/1.5.21 (2010-09-15) X-Pg-Spam-Score: -4.9 (----) 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 --ktyc2UzNUDZzGzis Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Robert, * Robert Haas (robertmhaas@gmail.com) wrote: > On Thu, Dec 8, 2016 at 1:49 PM, Stephen Frost wrote: > > * Robert Haas (rhaas@postgresql.org) wrote: > >> Implement table partitioning. > > > > My compiler apparently doesn't care for this: > > > > .../src/backend/catalog/partition.c: In function =E2=80=98partition_rbo= und_cmp=E2=80=99: > > .../src/backend/catalog/partition.c:1787:13: warning: =E2=80=98cmpval= =E2=80=99 may be used uninitialized in this function [-Wmaybe-uninitialized] > > if (cmpval =3D=3D 0 && lower1 !=3D lower2) >=20 > So, apparently your compiler doesn't recognize that the loop always > has to execute at least once, because we don't support a table > partitioned on zero attributes. If you initialize cmpval to 0 at the > top of the function, does that fix it? Yes, that makes the compiler warning go away. =2E.. your compiler knows that key->partnatts will always be >=3D 1? Thanks! Stephen --ktyc2UzNUDZzGzis Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJYSbBaAAoJEO1sijiDR2RVKUYP/1a8FuKHrkd8055C1I97v8D7 Ckw84ElIRJ94Hq6G1TLFMA00vTze3vLKlAAMYzg1r29STK5lkp7gw1EoP3ySeI5O 2wpT6yBAwsaIn4MzvDhruFCFcSoN88ARPWxPUh2UW2uapN4G5PfHkgSE8UWVvVJS 7LtL/SfEQIF06pLoR1PhrjnMX92OcOjLmlIx73/MyXc7NSq8qH/hcZGNmdoTrI1E y91yx9aiM9HYgA6Mn7bBLb54o9IiCTydJ/ouTXVPIl071M/mtSqJiXc1/wTsB/TP LGdKsjBgRBZdHcNNBqOP1YS1aCQ3NgDRSMyaTpQTETH23PzIlYyvkmk2tWJ94bTq ITLGBelmXfLz+Ol1vBzacQm0lvTxm1QcLArop/+NJssE6Yve4GjxfDB4FiqiHnrf MWhJkoiQ0T2UuGHaBmqVc9AAASQ3VZ30mGn7zwN8tVvc63OAXBPbKWRODA4K3vI5 Eo6CngTT8QO91+XacTs151HYfA2O70TzzNXJi3jAB94lnvl3R+jOhD4iIpaF4GhP AsCSnEFWL3F3wjX6R1Hf8fTAlS74lOYhyzCJCAgBgEIN2lrmXRdcmBvf2d70ZYhu fZPkBDuUBUGPrRrjqDNXf5B9wNV2zJfnHLuSZaLRhk6ABYe3ICmzKNO/m+pN8mUh 0xOyAKrVw5onWE7aGfSO =NTBu -----END PGP SIGNATURE----- --ktyc2UzNUDZzGzis--