Re: pgsql: Fix pg_size_bytes() to be more portable.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>
Cc: pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Fix pg_size_bytes() to be more portable.
Date: 2016-02-20 14:54:07
Message-ID: 5432.1455980047@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com> writes:
> Fix pg_size_bytes() to be more portable.
> Commit 53874c5228fe16589a4d01b3e1fab3678e0fd8e3 broke various 32-bit
> buildfarm machines because it incorrectly used an 'L' suffix for what
> needed to be a 64-bit literal. Thanks to Michael Paquier for helping
> to diagnose this.

That's still not right: not all compilers support "long long", and the
ones that don't won't have "LL" notation either.

Project style is to use something like "(uint64) 1024" instead.

regards, tom lane

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Dean Rasheed 2016-02-20 15:02:40 Re: pgsql: Fix pg_size_bytes() to be more portable.
Previous Message Pavel Stehule 2016-02-20 14:04:38 Re: pgsql: Add pg_size_bytes() to parse human-readable size strings.