Re: [PATCH] quiet conversion warning in DatumGetFloat4

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Chapman Flack <chap(at)anastigmatix(dot)net>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] quiet conversion warning in DatumGetFloat4
Date: 2017-05-31 05:26:30
Message-ID: 5894.1496208390@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Chapman Flack <chap(at)anastigmatix(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Chapman Flack 2017-05-31 05:55:11 Re: [PATCH] quiet conversion warning in DatumGetFloat4
Previous Message Stephen Frost 2017-05-31 05:20:14 Re: TAP backpatching policy