summaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/cash.c
AgeCommit message (Collapse)Author
2003-07-27Error message editing in utils/adt. Again thanks to Joe Conway for doingTom Lane
the bulk of the heavy lifting ...
2003-05-13More binary I/O routines.Tom Lane
2003-03-11Add explicit tests for division by zero to all user-accessible integerTom Lane
division and modulo functions, to avoid problems on OS X (which fails to trap 0 divide at all) and Windows (which traps it in some bizarre nonstandard fashion). Standardize on 'division by zero' as the one true spelling of this error message. Add regression tests as suggested by Neil Conway.
2002-09-04pgindent run.Bruce Momjian
2002-09-03Remove all traces of multibyte and locale options. Clean up commentsPeter Eisentraut
referring to "multibyte" where it really means character encoding.
2002-08-20Increase buffer size in cash_words(). Pure paranoia; I don't think theTom Lane
code is broken, but any small change in the output format might overrun the buffer with the old size.
2002-04-03Locale support is on by default. The choice of locale is done in initdbPeter Eisentraut
and/or with GUC variables.
2002-02-19Avoid failures in cash_out and cash_words for INT_MIN.Tom Lane
Also, 'fourty' -> 'forty'.
2001-10-25pgindent run on all C files. Java run to follow. initdb/regressionBruce Momjian
tests pass.
2001-03-22pgindent run. Make it all clean.Bruce Momjian
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-11-25Make PGLC_setlocale() static, and document that it can't be used safelyTom Lane
for any other purpose than PGLC_localeconv()'s internal save/restore of locale settings. Fix cash.c to call PGLC_localeconv() rather than making a direct call to localeconv() --- the old way, if PGLC_localeconv() had already cached a locale result, it would be overwritten by the first cash_in or cash_out operation, leading to wrong-locale results later. Probably no demonstrable bug today, since we only appear to be looking at the LC_MONETARY results which should be the same anyway, but definitely a gotcha waiting to strike.
2000-11-25Store current LC_COLLATE and LC_CTYPE settings in pg_control during initdb;Tom Lane
re-adopt these settings at every postmaster or standalone-backend startup. This should fix problems with indexes becoming corrupt due to failure to provide consistent locale environment for postmaster at all times. Also, refuse to start up a non-locale-enabled compilation in a database originally initdb'd with a non-C locale. Suppress LIKE index optimization if locale is not "C" or "POSIX" (are there any other locales where it's safe?). Issue NOTICE during initdb if selected locale disables LIKE optimization.
2000-11-18Modify locale code to defend against possibility that it was compiledTom Lane
with an -fsigned-char/-funsigned-char setting opposite to that of libc, thus breaking the convention that 'undefined' values returned by localeconv() are represented by CHAR_MAX. It is sheer stupidity that gcc even has such a switch --- it's just as bad as the structure-packing control switches offered by the more brain-dead PC compilers --- and as for the behavior of Linux distribution vendors who set RPM_OPT_FLAGS differently from the way they built libc, well, words fail me...
2000-08-03More functions updated to new fmgr style --- money, name, tid datatypes.Tom Lane
We're reaching the mopup stage here (good thing too, this is getting tedious).
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-07Rename cash_words_out to cash_words.Bruce Momjian
2000-07-06Functions on 'text' type updated to new fmgr style. 'text' isTom Lane
now TOAST-able.
2000-07-03TOASTJan Wieck
WARNING: This is actually broken - we have self-deadlocks due to concurrent changes in buffer management. Vadim and me are working on it. Jan
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-05-16Several compilation and run-time problems occur when building on SGIBruce Momjian
IRIX systems using the native compilers. A summary is: - Various files use "//" as a comment delimiter in c files. - Problems caused by assuming "char" is signed. cash.in: building -signed the rules regression test fails as described in FAQ_QNX4. If CHAR_MAX is "255U" then ((signed char)CHAR_MAX) is -1. postmaster.c: random number regression test failed without this change. - Some generic build issues and warning message cleanup. David Kaelbling
2000-04-12Ye-old pgindent run. Same 4-space tabs.Bruce Momjian
2000-03-19cash_words_out function truncated its output by 1 character due toTom Lane
incorrect use of StrNCpy.
2000-01-15Fixed all elog related warnings, as well as a few others.Peter Eisentraut
1999-07-17 Move some system includes into c.h, and remove duplicates.Bruce Momjian
1999-07-16Final cleanup.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-25pgindent run over code.Bruce Momjian
1998-10-12New INET functions from D'Arcy J.M. CainBruce Momjian
1998-09-01OK, folks, here is the pgindent output.Bruce Momjian
1998-09-01Renaming cleanup, no pgindent yet.Bruce Momjian
1998-06-15Remove un-needed braces around single statements.Bruce Momjian
1998-03-02Fix money type USE_LOCALE support at least for default "C" locale.Thomas G. Lockhart
Still has questionable code for some locale-specific strings.
1998-02-26pgindent run before 6.3 release, with Thomas' requested changes.Bruce Momjian
1998-01-07Allow varchar() to only store needed bytes. Remove PALLOC,PALLOCTYPE,PFREE. ↵Bruce Momjian
Clean up use of VARDATA.
1998-01-05Change some ABORTS to ERROR. Add line number when COPY Failure.Bruce Momjian
1998-01-05Change elog(WARN) to elog(ERROR) and elog(ABORT).Bruce Momjian
1997-10-25Add debugging statement enabled by CASHDEBUG symbol definition.Thomas G. Lockhart
1997-10-03From JM de Lauwereyns (jmlauwer@icdc.caissedesdepots.fr):Thomas G. Lockhart
lconv is already taken as a struct identifier defined in a /usr/include file. Only has an effect with USE_LOCALE enabled. (Apparently unique to AIX and/or AIX compiler? thomas)
1997-09-20Include functions for integer/money arithmetic.Thomas G. Lockhart
1997-09-18Inline memset() as MemSet().Bruce Momjian
1997-09-13Cleanup for cash patch .Bruce Momjian
1997-09-13Fix for copy to stdout for cash.Bruce Momjian
1997-09-08Used modified version of indent that understands over 100 typedefs.Bruce Momjian
1997-09-08Another PGINDENT run that changes variable indenting and case label ↵Bruce Momjian
indenting. Also static variable indenting.
1997-09-07Massive commit to run PGINDENT on all *.c and *.h files.Bruce Momjian