From: Tom Lane <tgl@sss.pgh.pa.us>
To: Chapman Flack <chap@anastigmatix.net>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Subject: Re: [PATCH] quiet conversion warning in DatumGetFloat4
Date: Thu, 01 Jun 2017 18:20:50 -0400
Message-ID: <20516.1496355650@sss.pgh.pa.us> (raw)
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>
<b3ee396d-7e86-3a57-50eb-def23267eea9@anastigmatix.net>
<19039.1496353285@sss.pgh.pa.us>
<59308FA7.90107@anastigmatix.net>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
Chapman Flack <chap@anastigmatix.net> 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, chap@anastigmatix.net
Subject: Re: [PATCH] quiet conversion warning in DatumGetFloat4
In-Reply-To: <20516.1496355650@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox