pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
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: Wed, 31 May 2017 01:26:30 -0400
Message-ID: <5894.1496208390@sss.pgh.pa.us> (raw)
In-Reply-To: <592E4D04.1070609@anastigmatix.net>
References: <592E4D04.1070609@anastigmatix.net>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

Chapman Flack <chap@anastigmatix.net> 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



view thread (9+ messages)  latest in thread

Message-ID: <5894.1496208390@sss.pgh.pa.us>
Permalink:  ../5894.1496208390@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/5894.1496208390@sss.pgh.pa.us

 · 

reply

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: <5894.1496208390@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