Commit Graph

12 Commits

Author SHA1 Message Date
Peter Eisentraut fc946c39ae Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
Peter Eisentraut 3f11971916 Remove extra newlines at end and beginning of files, add missing newlines
at end of files.
2010-08-19 05:57:36 +00:00
Tom Lane 4d17a2146c Insert a hack into get_float8_nan (both core and ecpg copies) to deal with
the fact that NetBSD/mips is currently broken, as per buildfarm member pika.

Also add regression tests to ensure that get_float8_nan and get_float4_nan
are exercised even on platforms where they are not needed by
float8in/float4in.

Zoltán Böszörményi and Tom Lane
2010-02-27 21:53:21 +00:00
Bruce Momjian f9ac414c35 Fix float4/8 to handle Infinity and Nan consistently, e.g. Infinity is a
valid result from a computation if one of the input values was infinity.
The previous code assumed an operation that returned infinity was an
overflow.

Handle underflow/overflow consistently, and add checks for aggregate
overflow.

Consistently prevent Inf/Nan from being cast to integer data types.

Fix INT_MIN % -1 to prevent overflow.

Update regression results for new error text.

Per report from Roman Kononov.
2007-01-02 20:00:50 +00:00
Neil Conway f5ab0a14ea Add a "USING" clause to DELETE, which is equivalent to the FROM clause
in UPDATE. We also now issue a NOTICE if a query has _any_ implicit
range table entries -- in the past, we would only warn about implicit
RTEs in SELECTs with at least one explicit RTE.

As a result of the warning change, 25 of the regression tests had to
be updated. I also took the opportunity to remove some bogus whitespace
differences between some of the float4 and float8 variants. I believe
I have correctly updated all the platform-specific variants, but let
me know if that's not the case.

Original patch for DELETE ... USING from Euler Taveira de Oliveira,
reworked by Neil Conway.
2005-04-07 01:51:41 +00:00
Neil Conway 975e27377a Adjust input routines for float4, float8 and oid to reject the empty string
as valid input (it was previously treated as 0). This input was deprecated
in 8.0 (and a warning was emitted). Regression tests updated.
2005-02-11 04:09:05 +00:00
Neil Conway bfd6f52b0e Allow 'Infinity' and '-Infinity' as input to the float4 and float8
types. Update the regression tests and the documentation to reflect
this. Remove the UNSAFE_FLOATS #ifdef.

This is only half the story: we still unconditionally reject
floating point operations that result in +/- infinity. See
recent thread on -hackers for more information.
2004-03-12 00:25:43 +00:00
Neil Conway e2ded829f6 Revise int2/int4/int8/float4/float8 input routines to allow for
any amount of leading or trailing whitespace (where "whitespace"
is defined by isspace()). This is for SQL conformance, as well
as consistency with other numeric types (e.g. oid, numeric).

Also refactor pg_atoi() to avoid looking at errno where not
necessary, and add a bunch of regression tests for the input
to these types.
2004-03-11 02:11:14 +00:00
Thomas G. Lockhart 61ef6a1a3f Clean up syntax to use SQL92-ish type coersion
rather than the Postgres "::" notation.
All of these tests have been completely inspected and give correct results.
2000-01-04 16:21:02 +00:00
Thomas G. Lockhart 83b8cf5b6b Add inter-type regression tests for geometry, date/time, and numbers.
Add regression tests for circles, line segments, and paths.
Modify regression tests to allow GEQ optimizer (order results).
1997-05-11 15:42:09 +00:00
Marc G. Fournier 3451abf632 Make these self-contained tests...they are testing types, so the tables
that are created should only exist as long as the test requires them...

things are just toooooo spread around
1997-04-27 04:36:10 +00:00
Marc G. Fournier 04688df668 Again, add more tests 1997-04-05 11:26:55 +00:00