Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dFwBh-0007GH-Rz for pgsql-hackers@arkaria.postgresql.org; Wed, 31 May 2017 05:28:53 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dFwBg-0004iO-QG for pgsql-hackers@arkaria.postgresql.org; Wed, 31 May 2017 05:28:52 +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 1dFwAB-0001wt-1U for pgsql-hackers@postgresql.org; Wed, 31 May 2017 05:27:19 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dFwA4-0001Tx-0u for pgsql-hackers@postgresql.org; Wed, 31 May 2017 05:27:17 +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 v4V5QULX005895; Wed, 31 May 2017 01:26:30 -0400 From: Tom Lane To: Chapman Flack cc: PostgreSQL Hackers Subject: Re: [PATCH] quiet conversion warning in DatumGetFloat4 In-reply-to: <592E4D04.1070609@anastigmatix.net> References: <592E4D04.1070609@anastigmatix.net> Comments: In-reply-to Chapman Flack message dated "Wed, 31 May 2017 00:56:36 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <5893.1496208390.1@sss.pgh.pa.us> Date: Wed, 31 May 2017 01:26:30 -0400 Message-ID: <5894.1496208390@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: > - myunion.value = GET_4_BYTES(X); > + myunion.value = (int32)GET_4_BYTES(X); Hm. I think it would be better to use DatumGetInt32 here. Arguably, direct use of GET_4_BYTES and its siblings should only appear in DatumGetFoo macros. 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