Fix Joubert's complaint that int8-sized numeric literals are mishandled
Tom Lane <tgl@sss.pgh.pa.us>
Fix Joubert's complaint that int8-sized numeric literals are mishandled on Alpha (because parser mistakenly assumes that a nonoverflow result from strtol means the value will fit into int4). A scan for other uses of strtol and strtoul found a couple other places with the same mistake; fix them too. The changes are all conditional on HAVE_LONG_INT_64 to avoid complaints from compilers that think x != x is a silly test (cf. pg_atoi).
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/nodes/read.c | modified | +11 −5 |
| src/backend/parser/scan.l | modified | +19 −5 |
| src/backend/utils/misc/guc.c | modified | +7 −2 |