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
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-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

Browse pgsql-committers by date

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

Browse pgsql-hackers by date

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