Re: [PATCH] Custom code int(32|64) => text conversions out of performance reasons - Mailing list pgsql-hackers

From Robert Haas
Subject Re: [PATCH] Custom code int(32|64) => text conversions out of performance reasons
Date
Msg-id AANLkTinUSOgBfxEfNXCORW0hpynt1qLR0Cdes03z4nUZ@mail.gmail.com
Whole thread Raw
In response to Re: [PATCH] Custom code int(32|64) => text conversions out of performance reasons  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [PATCH] Custom code int(32|64) => text conversions out of performance reasons
Re: [PATCH] Custom code int(32|64) => text conversions out of performance reasons
List pgsql-hackers
On Sat, Nov 20, 2010 at 10:38 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> The trouble with that approach is that you have to depend on the
> direction of rounding for negative quotients.  Which was unspecified
> before C99, and it's precisely pre-C99 compilers that are posing a
> hazard to the current coding.

Interesting.  I wondered whether there might be compilers out there
that handled that inconsistently, but then I thought I was probably
being paranoid.

> Likewise for the int64 case, which BTW is no safer for pre-C99 compilers
> than it was yesterday: LL is not the portable way to write int64
> constants.

Gah.  I wish we had some documentation of this stuff.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [PATCH] Custom code int(32|64) => text conversions out of performance reasons
Next
From: Tom Lane
Date:
Subject: Re: [PATCH] Custom code int(32|64) => text conversions out of performance reasons