Tom Lane
f2d1205322
Another batch of fmgr updates. I think I have gotten all old-style
...
functions that take pass-by-value datatypes. Should be ready for
port testing ...
26 years ago
Tom Lane
48165ec226
Latest round of fmgr updates. All functions with bool,char, or int2
...
inputs have been converted to newstyle. This should go a long way towards
fixing our portability problems with platforms where char and short
parameters are passed differently from int-width parameters. Still
more to do for the Alpha port however.
26 years ago
Bruce Momjian
52f77df613
Ye-old pgindent run. Same 4-space tabs.
26 years ago
Tom Lane
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.
26 years ago
Tom Lane
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.
26 years ago
Tom Lane
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.
26 years ago
Tom Lane
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.
26 years ago
Tom Lane
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.
26 years ago
Bruce Momjian
b78769fda2
Fix it's and its to be correct.
26 years ago
Jan Wieck
b5c4b77283
Added nbtree operator class for NUMERIC
...
Jan
26 years ago
Bruce Momjian
3406901a29
Move some system includes into c.h, and remove duplicates.
27 years ago
Bruce Momjian
4b2c2850bf
Clean up #include in /include directory. Add scripts for checking includes.
27 years ago
Bruce Momjian
0cf1b79528
Cleanup of /include #include's, for 6.6 only.
27 years ago
Bruce Momjian
fcff1cdf4e
Another pgindent run. Sorry folks.
27 years ago
Bruce Momjian
4eadfe8754
Make 0x007f -> (unsigned)0x7f to make pgindent happy.
27 years ago
Bruce Momjian
07842084fe
pgindent run over code.
27 years ago
Jan Wieck
bb885dd1a1
Check for NUMERIC overflow a second time after rounding
...
Jan
27 years ago
Thomas G. Lockhart
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').
27 years ago
Bruce Momjian
8930699cd6
src/backend/utils/adt/numeric.c fails to compile due to a string having
...
an
embedded new-line character.
Billy G. Allie
27 years ago
Bruce Momjian
6724a50787
Change my-function-name-- to my_function_name, and optimizer renames.
27 years ago
Jan Wieck
814c8495a7
Removed precision restriction in numeric_round() causing
...
overflow error on high precision calculations where temporary
huge precision is required.
Jan
27 years ago
Jan Wieck
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
27 years ago
Jan Wieck
c1855793df
Fixed backend crashing bug in apply_typmod()
...
Jan
27 years ago
Jan Wieck
e3a5ac283b
Little fix for round() function
...
Jan
27 years ago
Bruce Momjian
936d89e9e0
Fix NAN code.
27 years ago
Bruce Momjian
6fd29f2c01
Fix for NAN generation.
27 years ago
Bruce Momjian
d8ae7ffb2f
Fix for no platform NAN.
27 years ago
Jan Wieck
5df20d4449
Little precision fix for POWER(). I discovered problems with big
...
exponents.
Jan
27 years ago
Jan Wieck
0e9d75c6ac
Added NUMERIC data type with many builtin funcitons, operators
...
and aggregates.
Jan
27 years ago