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

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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Dave Page <dpage(at)postgresql(dot)org>
Cc: 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-28 05:21:55
Message-ID: 18779.1303968115@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-committerspgsql-hackers
Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
> Excerpts from Tom Lane's message of mi abr 27 17:10:37 -0300 2011:
>> Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
>>> 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?

I'm not excited about trying random code changes to dodge a compiler bug
with a 24-hour turnaround time.  Dave, can you poke at this?

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Palle GirgensohnDate: 2011-04-28 05:25:41
Subject: Re: [ANNOUNCE] PostgreSQL Core Team
Previous:From: Dmitry FefelovDate: 2011-04-28 05:05:26
Subject: Re: Fail to search in array, produced by subquery - is it a bug?

pgsql-committers by date

Next:From: Dave PageDate: 2011-04-28 09:14:55
Subject: edb-debugger - server: Support the new DefineCustomStringVariable API in
Previous:From: Hiroshi SaitoDate: 2011-04-28 01:03:36
Subject: psqlodbc - psqlodbc: Prep release 09.00.0300.

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