Re: INT64_MIN and _MAX - Mailing list pgsql-hackers

From Andrew Gierth
Subject Re: INT64_MIN and _MAX
Date
Msg-id 87lhil6dpi.fsf@news-spur.riddles.org.uk
Whole thread Raw
In response to Re: INT64_MIN and _MAX  (Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>)
List pgsql-hackers
>>>>> "Kyotaro" == Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp> writes:
Kyotaro> Hello,Kyotaro> Grep showed me some unfixed usages of bare constant orKyotaro> INT64CONST as (u)int64 max/min
values.
Kyotaro> ./src/interfaces/ecpg/pgtypeslib/dt.h:

I didn't touch the ecpg stuff since it wasn't too clear that it was safe
to change, but on second look it is.
Kyotaro> ./contrib/pgcrypto/imath.h:

I didn't touch this since it was obviously a library copied from
somewhere else.
Kyotaro> ./src/backend/utils/mb/wchar.cKyotaro> ./src/bin/psql/mbprint.c:>> return 0xffffffff;

Here 0xffffffff is not a uint or uint32, but a pg_wchar (which is
unsigned int, not uint32). What's needed there is not UINT_MAX but
rather a PG_WCHAR_INVALID or similar definition in pg_wchar.h.

-- 
Andrew (irc:RhodiumToad)



pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Error with index on unlogged table
Next
From: Álvaro Hernández Tortosa
Date:
Subject: Re: Repeatable read and serializable transactions see data committed after tx start