e631df3c1b
Extend numeric_round and numeric_trunc to accept negative scale inputs
...
(ie, allow rounding to occur at a digit position left of the decimal
point). Apparently this is how Oracle handles it, and there are
precedents in other programming languages as well.
2000-03-13 02:31:13 +00:00
9110b33f46
Add numeric <-> int8 and numeric <-> int2 conversion functions, as well
...
as a unary minus operator for numeric. Now that long numeric constants
will get converted to NUMERIC in early parsing, it's essential to have
numeric->int8 conversion to avoid 'can't convert' errors on undecorated
int8 constants. Threw in the rest for completeness while I was in the
area.
I did not force an initdb for this, since the system will still run
without the new pg_proc/pg_operator entries. Possibly I should've.
2000-02-24 02:05:30 +00:00
08195a43f3
Fix bugs in NUMERIC ceil() and floor() functions. ceil(0) returned 1,
...
and both would insert random junk digits if given an input that was an
exact multiple of 10.
2000-01-20 02:21:44 +00:00
d58fa7611b
numeric_in accepts exponents; numeric to int4 rounds; float4/8 to numeric
...
is considerably more robust and accurate than it used to be.
Also, get rid of numeric's private allocation freelist, which is no longer
a win since Jan rewrote palloc.
2000-01-18 03:44:41 +00:00
3cb8c8da68
Clean up problems with rounding/overflow code in NUMERIC, particularly
...
the case wherein zero was rejected for a field like NUMERIC(4,4).
Miscellaneous other code beautification efforts.
2000-01-15 23:42:49 +00:00
b78769fda2
Fix it's and its to be correct.
2000-01-05 18:23:54 +00:00
b5c4b77283
Added nbtree operator class for NUMERIC
...
Jan
1999-09-29 21:13:31 +00:00
3406901a29
Move some system includes into c.h, and remove duplicates.
1999-07-17 20:18:55 +00:00
4b2c2850bf
Clean up #include in /include directory. Add scripts for checking includes.
1999-07-15 15:21:54 +00:00
0cf1b79528
Cleanup of /include #include's, for 6.6 only.
1999-07-14 01:20:30 +00:00
fcff1cdf4e
Another pgindent run. Sorry folks.
1999-05-25 22:43:53 +00:00
4eadfe8754
Make 0x007f -> (unsigned)0x7f to make pgindent happy.
1999-05-25 22:04:56 +00:00
07842084fe
pgindent run over code.
1999-05-25 16:15:34 +00:00
bb885dd1a1
Check for NUMERIC overflow a second time after rounding
...
Jan
1999-05-10 18:17:44 +00:00
84e832a802
Use sprintf() to convert float8 to a string during conversion to numeric.
...
Original code used float8out(), but the resulting exponential notation
was not handled (e.g. '3E9' was decoded as '3').
1999-05-04 15:50:24 +00:00
8930699cd6
src/backend/utils/adt/numeric.c fails to compile due to a string having
...
an
embedded new-line character.
Billy G. Allie
1999-03-14 16:49:32 +00:00
6724a50787
Change my-function-name-- to my_function_name, and optimizer renames.
1999-02-13 23:22:53 +00:00
814c8495a7
Removed precision restriction in numeric_round() causing
...
overflow error on high precision calculations where temporary
huge precision is required.
Jan
1999-01-05 11:10:45 +00:00
1bbe55c79f
Just one more bugfix - this time in cmp_abs (cannot imagine that
...
taking a logarithm with a 400 digit precision worked with that bug
in place).
Jan
1999-01-04 17:51:58 +00:00
c1855793df
Fixed backend crashing bug in apply_typmod()
...
Jan
1999-01-04 12:53:23 +00:00
e3a5ac283b
Little fix for round() function
...
Jan
1999-01-04 11:20:33 +00:00
936d89e9e0
Fix NAN code.
1999-01-03 05:30:47 +00:00
6fd29f2c01
Fix for NAN generation.
1999-01-03 02:40:12 +00:00
d8ae7ffb2f
Fix for no platform NAN.
1999-01-01 04:17:13 +00:00
5df20d4449
Little precision fix for POWER(). I discovered problems with big
...
exponents.
Jan
1998-12-30 20:46:06 +00:00
0e9d75c6ac
Added NUMERIC data type with many builtin funcitons, operators
...
and aggregates.
Jan
1998-12-30 19:56:35 +00:00