Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dGYVH-0003FG-HR for pgsql-hackers@arkaria.postgresql.org; Thu, 01 Jun 2017 22:23:39 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dGYVG-00062B-Ou for pgsql-hackers@arkaria.postgresql.org; Thu, 01 Jun 2017 22:23:38 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dGYTj-0003Ko-1e for pgsql-hackers@postgresql.org; Thu, 01 Jun 2017 22:22:03 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dGYTE-0005vW-ON for pgsql-hackers@postgresql.org; Thu, 01 Jun 2017 22:21:45 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id v51MKogm020517; Thu, 1 Jun 2017 18:20:50 -0400 From: Tom Lane To: Chapman Flack cc: PostgreSQL Hackers Subject: Re: [PATCH] quiet conversion warning in DatumGetFloat4 In-reply-to: <59308FA7.90107@anastigmatix.net> References: <592E4D04.1070609@anastigmatix.net> <5894.1496208390@sss.pgh.pa.us> <592E5ABF.8070706@anastigmatix.net> <22297.1496244978@sss.pgh.pa.us> <19039.1496353285@sss.pgh.pa.us> <59308FA7.90107@anastigmatix.net> Comments: In-reply-to Chapman Flack message dated "Thu, 01 Jun 2017 18:05:27 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <20515.1496355650.1@sss.pgh.pa.us> Date: Thu, 01 Jun 2017 18:20:50 -0400 Message-ID: <20516.1496355650@sss.pgh.pa.us> X-Pg-Spam-Score: -1.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 Chapman Flack writes: > It might be fun to see how big a chunk of the 4106 would vanish just > with the first tweak to one of the causes that's mentioned in a lot of > them. (Unless your figures were already after culling to distinct causes, > which would sound like a more-than-casual effort.) No, I just did "make 2>&1 | grep 'warning: conversion' | wc". I did look through the warnings a little bit. A lot of them seem to be caused by our being cavalier about using "int" parameters and/or loop variables to represent attribute numbers; as soon as you pass one of those to an API that's declared AttrNumber, warning. Another large batch are from conversions from size_t to int, a practice that's perfectly safe for palloc'd values. And I saw some in the planner from conversions of rowcounts to double --- yes, I know that's imprecise, thank you very much. Based on what I saw, there are hardly any places where a single touch would remove a large number of these warnings; it'd be more like fixing them retail, and it would be pretty pointless. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers