*** src/backend/utils/adt/numutils.c.orig Sun Mar 1 00:58:32 1998 --- src/backend/utils/adt/numutils.c Sun Mar 1 01:00:44 1998 *************** *** 55,60 **** --- 55,67 ---- Assert(s); + /* Some versions of strtol treat the empty string as an error. This + * code will make those versions of strtol return 0 for an empty string. + */ + + if (s == (char *)NULL || *s == 0) + return ((int32)0); + errno = 0; l = strtol(s, &badp, 10); if (errno) /* strtol must set ERANGE */