Re: BUG #15519: Casting float4 into int4 gets the wrong sign instead of "integer out of range" error

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Victor Petrovykh <victor@magic.io>
Cc: andrew@tao11.riddles.org.uk, pgsql-bugs@lists.postgresql.org
Date: 2018-11-28T20:49:40Z
Lists: pgsql-bugs
Victor Petrovykh <victor@magic.io> writes:
> I have one more related question: is a fix for this likely to appear in the
> next Postgres release?

Yes, it was pushed last week.

https://git.postgresql.org/gitweb/?p=postgresql.git&a=commitdiff&h=e473e1f2b

			regards, tom lane


Commits

  1. Update additional float4/8 expected-output files.

  2. Fix float-to-integer coercions to handle edge cases correctly.

  3. Adjust new test case for more portability.