Tom Lane wrote:
So forget my previous proposed patch and try this one:
/* skip leading whitespace */
while (*num != '\0' isspace((unsigned char) *num))
num++;
errno = 0;
val = strtod(num, endptr);
+ if (endptr != num endptr[-1] == 0)
+
Tom Lane wrote:
This seems quite bizarre: ' -INFINiTY ' works but
'infinity' does not? Please try in psql
\set VERBOSITY verbose
SELECT 'infinity'::float4;
and send along the output.
It's even a little more bizarre:
When I start a fresh psql session, SELECT
System Configuration
-
Architecture (example: Intel Pentium) : Intel Pentium
Operating System (example: Linux 2.4.18) : Linux 2.4.21-grsec
(Debian)
PostgreSQL version (example: PostgreSQL-8.0): PostgreSQL-8.0.0-beta1
Compiler used (example: gcc 2.95.2)
System Configuration
-
Architecture (example: Intel Pentium) : sun4u sparc
SUNW,Ultra-250
Operating System (example: Linux 2.4.18) : Solaris8 (SunOS
myhost 5.8 Generic_108528-29 )
PostgreSQL version (example: PostgreSQL-8.0): PostgreSQL-8.0.0 (beta1)