Skip site navigation (1) Skip section navigation (2)

Re: pgsql: Fix pg_size_pretty() to avoid overflow for inputs close to INT64

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, pgsql-committers <pgsql-committers(at)postgresql(dot)org>
Subject: Re: pgsql: Fix pg_size_pretty() to avoid overflow for inputs close to INT64
Date: 2011-04-27 20:31:22
Message-ID: 1303936176-sup-8131@alvh.no-ip.org (view raw or flat)
Thread:
Lists: pgsql-committerspgsql-hackers
Excerpts from Tom Lane's message of mié abr 27 17:10:37 -0300 2011:
> Alvaro Herrera <alvherre(at)commandprompt(dot)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(at)commandprompt(dot)com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

Responses

pgsql-hackers by date

Next:From: Yves WeißigDate: 2011-04-27 20:35:16
Subject: Re: Best way to construct Datum out of a string?
Previous:From: Kevin GrittnerDate: 2011-04-27 20:29:19
Subject: Re: make world fails

pgsql-committers by date

Next:From: Tom LaneDate: 2011-04-27 20:52:10
Subject: pgsql: Make a quick copy-editing pass over the 9.1 release notes.
Previous:From: Tom LaneDate: 2011-04-27 20:10:37
Subject: Re: pgsql: Fix pg_size_pretty() to avoid overflow for inputs close to INT64

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group