Re: pgsql: Fix pg_size_pretty() to avoid overflow for inputs close to INT64 - Mailing list pgsql-committers

From Alvaro Herrera
Subject Re: pgsql: Fix pg_size_pretty() to avoid overflow for inputs close to INT64
Date
Msg-id 1303936176-sup-8131@alvh.no-ip.org
Whole thread Raw
In response to Re: pgsql: Fix pg_size_pretty() to avoid overflow for inputs close to INT64  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: pgsql: Fix pg_size_pretty() to avoid overflow for inputs close to INT64  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-committers
Excerpts from Tom Lane's message of mié abr 27 17:10:37 -0300 2011:
> Alvaro Herrera <alvherre@commandprompt.com> writes:
> > Excerpts from Tom Lane's message of lun abr 25 17:22:41 -0300 2011:
> >> Fix pg_size_pretty() to avoid overflow for inputs close to INT64_MAX.
>
> > Apparently this change is causing Moa's SunStudio compiler to fail an
> > assertion.
>
> [ scratches head... ]  Hard to see why, there's nothing at all
> interesting in that code.

I agree, but it fails exactly in that code, and started to fail
immediately after that patch.

Maybe casting the 2 to int64 would fix it?

--
Álvaro Herrera <alvherre@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: Re: pgsql: Fix pg_size_pretty() to avoid overflow for inputs close to INT64
Next
From: Tom Lane
Date:
Subject: pgsql: Make a quick copy-editing pass over the 9.1 release notes.