summaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/numeric.c
AgeCommit message (Collapse)Author
2001-03-14Fix numeric modulo operator for case of fractional right argument.Tom Lane
2000-12-07Silence compiler warning.Tom Lane
2000-12-03Ensure that all uses of <ctype.h> functions are applied to unsigned-charTom Lane
values, whether the local char type is signed or not. This is necessary for portability. Per discussion on pghackers around 9/16/00.
2000-08-01Convert all remaining float4 and float8 functions to new fmgr style.Tom Lane
At this point I think it'd be possible to make float4 be pass-by-value without too much work --- and float8 too on machines where Datum is 8 bytes. Something to try when the mood strikes, anyway.
2000-07-29bpchar, varchar, bytea, numeric are toastable --- if you initdb, whichTom Lane
I did not force. I marked numeric as compressable-but-not-move-off-able, partly to test that storage mode and partly because I've got doubts that numerics are large enough to need external storage.
2000-07-17Revise aggregate functions per earlier discussions in pghackers.Tom Lane
There's now only one transition value and transition function. NULL handling in aggregates is a lot cleaner. Also, use Numeric accumulators instead of integer accumulators for sum/avg on integer datatypes --- this avoids overflow at the cost of being a little slower. Implement VARIANCE() and STDDEV() aggregates in the standard backend. Also, enable new LIKE selectivity estimators by default. Unrelated change, but as long as I had to force initdb anyway...
2000-06-15Clean up #include's.Bruce Momjian
2000-06-14Big warnings cleanup for Solaris/GCC. Down to about 40 now, butPeter Eisentraut
we'll get there one day. Use `cat' to create aclocal.m4, not `aclocal'. Some people don't have automake installed. Only run the autoconf rule in the top-level GNUmakefile if the invoker specified `make configure', don't run it automatically because of CVS timestamp skew.
2000-06-13Another batch of fmgr updates. I think I have gotten all old-styleTom Lane
functions that take pass-by-value datatypes. Should be ready for port testing ...
2000-06-05Latest round of fmgr updates. All functions with bool,char, or int2Tom Lane
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.
2000-04-12Ye-old pgindent run. Same 4-space tabs.Bruce Momjian
2000-03-13Extend numeric_round and numeric_trunc to accept negative scale inputsTom Lane
(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-02-24Add numeric <-> int8 and numeric <-> int2 conversion functions, as wellTom Lane
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-01-20Fix bugs in NUMERIC ceil() and floor() functions. ceil(0) returned 1,Tom Lane
and both would insert random junk digits if given an input that was an exact multiple of 10.
2000-01-18numeric_in accepts exponents; numeric to int4 rounds; float4/8 to numericTom Lane
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-15Clean up problems with rounding/overflow code in NUMERIC, particularlyTom Lane
the case wherein zero was rejected for a field like NUMERIC(4,4). Miscellaneous other code beautification efforts.
2000-01-05Fix it's and its to be correct.Bruce Momjian
1999-09-29Added nbtree operator class for NUMERICJan Wieck
Jan
1999-07-17 Move some system includes into c.h, and remove duplicates.Bruce Momjian
1999-07-15Clean up #include in /include directory. Add scripts for checking includes.Bruce Momjian
1999-07-14Cleanup of /include #include's, for 6.6 only.Bruce Momjian
1999-05-25Another pgindent run. Sorry folks.Bruce Momjian
1999-05-25Make 0x007f -> (unsigned)0x7f to make pgindent happy.Bruce Momjian
1999-05-25pgindent run over code.Bruce Momjian
1999-05-10Check for NUMERIC overflow a second time after roundingJan Wieck
Jan
1999-05-04Use sprintf() to convert float8 to a string during conversion to numeric.Thomas G. Lockhart
Original code used float8out(), but the resulting exponential notation was not handled (e.g. '3E9' was decoded as '3').
1999-03-14src/backend/utils/adt/numeric.c fails to compile due to a string havingBruce Momjian
an embedded new-line character. Billy G. Allie
1999-02-13Change my-function-name-- to my_function_name, and optimizer renames.Bruce Momjian
1999-01-05Removed precision restriction in numeric_round() causingJan Wieck
overflow error on high precision calculations where temporary huge precision is required. Jan
1999-01-04Just one more bugfix - this time in cmp_abs (cannot imagine thatJan Wieck
taking a logarithm with a 400 digit precision worked with that bug in place). Jan
1999-01-04Fixed backend crashing bug in apply_typmod()Jan Wieck
Jan
1999-01-04Little fix for round() functionJan Wieck
Jan
1999-01-03Fix NAN code.Bruce Momjian
1999-01-03Fix for NAN generation.Bruce Momjian
1999-01-01Fix for no platform NAN.Bruce Momjian
1998-12-30Little precision fix for POWER(). I discovered problems with bigJan Wieck
exponents. Jan
1998-12-30Added NUMERIC data type with many builtin funcitons, operatorsJan Wieck
and aggregates. Jan