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

Re: Clear up strxfrm() in UTF-8 with locale on Windows

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: ITAGAKI Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>, pgsql-patches(at)postgresql(dot)org
Subject: Re: Clear up strxfrm() in UTF-8 with locale on Windows
Date: 2007-05-05 17:07:38
Message-ID: (view raw or whole thread)
Lists: pgsql-patches
Magnus Hagander wrote:
> On Wed, May 02, 2007 at 05:25:39PM -0400, Tom Lane wrote:
>> Magnus Hagander <magnus(at)hagander(dot)net> writes:
>>> Given this, perhaps the proper approach should instead be to just check
>>> the return value, and go from there? Should be a simple enough patch,
>>> something like the attached.
>>> Tom, can you comment?
>> Testing against INT_MAX seems like a type pun, or something.  Maybe use
>> MaxAllocSize instead?
> The windows API documentation specifically says:
> On an error, each function sets errno and returns INT_MAX.
> So actually an equality test against INT_MAX would be correct. But making
> that clear in the comment would probably not be a bad idea :-)

I have applied a fix for this, because it obviously needed fixing
regardless of if it fixes the original issue all the way. Still looking
for confirmation if it does, though.


In response to


pgsql-patches by date

Next:From: Neil ConwayDate: 2007-05-06 03:28:06
Subject: Enable integer datetimes by default
Previous:From: Bruce MomjianDate: 2007-05-05 14:44:42
Subject: Re: [WIP] GUC for temp_tablespaces

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