OSDN Git Service

pg_atoi() does range check on int4 data only if
authorBruce Momjian <bruce@momjian.us>
Thu, 8 Jul 1999 00:27:01 +0000 (00:27 +0000)
committerBruce Momjian <bruce@momjian.us>
Thu, 8 Jul 1999 00:27:01 +0000 (00:27 +0000)
commit5035d7b9855bf43a1cb1c86fb842d6930cfb09db
treeeae50fdde247e4df4c283a0c243d81fd6a99e7a4
parenta6c688d9cd56ed4f8e777288b9a16de88663d0ea
pg_atoi() does range check on int4 data only if
"HAS_LONG_LONG" is defined based on the assumption that
strtol() would return ERANGE if a platform does not support
64-bit integers. In current PostgreSQL 6.5 (and 6.4.2)
distribution, "HAS_LONG_LONG" is defined only if platform
is "alpha". (See include/port/alpha.h) I think the int4
range check should apply to linux_alpha as well. (I have
not tested yet but I guess this might be applicable to
newer Linux/i386 distributions which includes new GCC which
implements long int as 64-bit int.)
src/backend/utils/adt/numutils.c