aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/int8.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2010-01-07 04:53:35 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2010-01-07 04:53:35 +0000
commit901be0fad4034c9cf8a3588fd6cf2ece82e4b8ce (patch)
tree9d25bde7c4533c4be739a78ef14249b06b74e7f7 /src/backend/utils/adt/int8.c
parentc282b36dd2a19a4bc05cc81cb4996081a1731d2e (diff)
downloadpostgresql-901be0fad4034c9cf8a3588fd6cf2ece82e4b8ce.tar.gz
postgresql-901be0fad4034c9cf8a3588fd6cf2ece82e4b8ce.zip
Remove all the special-case code for INT64_IS_BUSTED, per decision that
we're not going to support that anymore. I did keep the 64-bit-CRC-with-32-bit-arithmetic code, since it has a performance excuse to live. It's a bit moot since that's all ifdef'd out, of course.
Diffstat (limited to 'src/backend/utils/adt/int8.c')
-rw-r--r--src/backend/utils/adt/int8.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/backend/utils/adt/int8.c b/src/backend/utils/adt/int8.c
index a7cad6db60b..6707b79e548 100644
--- a/src/backend/utils/adt/int8.c
+++ b/src/backend/utils/adt/int8.c
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/utils/adt/int8.c,v 1.76 2010/01/02 16:57:54 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/utils/adt/int8.c,v 1.77 2010/01/07 04:53:34 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -76,15 +76,12 @@ scanint8(const char *str, bool errorOK, int64 *result)
* Do an explicit check for INT64_MIN. Ugly though this is, it's
* cleaner than trying to get the loop below to handle it portably.
*/
-#ifndef INT64_IS_BUSTED
if (strncmp(ptr, "9223372036854775808", 19) == 0)
{
tmp = -INT64CONST(0x7fffffffffffffff) - 1;
ptr += 19;
goto gotdigits;
}
-#endif
-
sign = -1;
}
else if (*ptr == '+')
@@ -575,12 +572,9 @@ int8mul(PG_FUNCTION_ARGS)
* Since the division is likely much more expensive than the actual
* multiplication, we'd like to skip it where possible. The best bang for
* the buck seems to be to check whether both inputs are in the int32
- * range; if so, no overflow is possible. (But that only works if we
- * really have a 64-bit int64 datatype...)
+ * range; if so, no overflow is possible.
*/
-#ifndef INT64_IS_BUSTED
if (arg1 != (int64) ((int32) arg1) || arg2 != (int64) ((int32) arg2))
-#endif
{
if (arg2 != 0 &&
(result / arg2 != arg1 || (arg2 == -1 && arg1 < 0 && result < 0)))