git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b2965b9)
Improve dpow() check for ERANGE overflow for HPPA.
Sat, 6 Jan 2007 04:14:55 +0000 (04:14 +0000)
Sat, 6 Jan 2007 04:14:55 +0000 (04:14 +0000)

diff --git a/src/backend/utils/adt/float.c b/src/backend/utils/adt/float.c
index 9cda3706afa4da887246dc6bf8af91edfd856021..ef2da34a80e9fb1213b81db6eb7a7df6f93f61ed 100644 (file)
--- a/src/backend/utils/adt/float.c
+++ b/src/backend/utils/adt/float.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/utils/adt/float.c,v 1.143 2007年01月06日 02:28:38 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/utils/adt/float.c,v 1.144 2007年01月06日 04:14:55 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -1459,10 +1459,9 @@ dpow(PG_FUNCTION_ARGS)
else
result = 1;
}
- else if (errno == ERANGE)
- {
- result = (arg1 >= 0) ? get_float8_infinity() : -get_float8_infinity();
- }
+ /* Some platoforms, e.g. HPPA, return ERANGE, but HUGE_VAL, not Inf */
+ else if (errno == ERANGE && !isinf(result))
+ result = get_float8_infinity();
CHECKFLOATVAL(result, isinf(arg1) || isinf(arg2), arg1 == 0);
PG_RETURN_FLOAT8(result);
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /