aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/formatting.c
Commit message (Collapse)AuthorAge
...
* Add comment that to_char() for broken glibc pt_BR might cause a problem.Bruce Momjian2007-02-13
|
* Remove blank lines in code.Bruce Momjian2007-02-09
|
* Remove blank line from C code.Bruce Momjian2007-02-09
|
* Fix bug when localized to_char() day or month names were incorectlyBruce Momjian2007-02-08
| | | | | | trnasformed to lower or upper string. Pavel Stehule
* Fix bug in our code when using to_timestamp() or to_date() without "TM".Bruce Momjian2007-02-08
| | | | | Assume "TM" when input fields are variable-length, like month or day names. This matches Oracle behavior.
* Fix handling of CC (century) format spec in to_date/to_char. According toTom Lane2007-01-12
| | | | | | | | standard convention the 21st century runs from 2001-2100, not 2000-2099, so make it work like that. Per bug #2885 from Akio Iwaasa. Backpatch to 8.2, but no further, since this is really a definitional change; users of older branches are probably more interested in stability.
* Update CVS HEAD for 2007 copyright. Back branches are typically notBruce Momjian2007-01-05
| | | | back-stamped for this.
* Add workaround for localizing May and abbreviated May differently. IdeaPeter Eisentraut2006-11-28
| | | | of Dennis Björklund.
* Revert (too late in beta):Bruce Momjian2006-11-24
| | | | | | Fix to_char() locale handling to honor LC_TIME, not LC_MESSAGES. Euler Taveira de Oliveira
* Fix to_char() locale handling to honor LC_TIME, not LC_MESSAGES.Bruce Momjian2006-11-24
| | | | Euler Taveira de Oliveira
* pgindent run for 8.2.Bruce Momjian2006-10-04
|
* Back out patch added during 8.2.X development:Bruce Momjian2006-09-10
| | | | | | | Allow to_char() "D" format specifiers for interval/time. It doesn't work, and I doubt it is useful enough to fix ("D" = day of week).
* Fix case where "PM" to_timestamp() mask was eating too many characters.Bruce Momjian2006-09-03
| | | | Report from Josh Tolley.
* Fix problem that sscanf(buf, "%d", &val) eats leading white space, butBruce Momjian2006-04-19
| | | | our to_* functions were not handling that.
* C code whitespace inprovement for formatting.c.Bruce Momjian2006-04-19
|
* Update copyright for 2006. Update scripts.Bruce Momjian2006-03-05
|
* Add comment about localized month names for to_date and to_timestamp.Bruce Momjian2006-03-03
|
* Revert because C locale uses "" for thousands_sep, meaning "n/a", whileBruce Momjian2006-02-12
| | | | | French uses "" for "don't want". Seems we have to keep the existing behavior.
* Support "" for thousands separator and plus sign in to_char(), perBruce Momjian2006-02-12
| | | | report from French Debian user. psql already handles "" fine.
* Allow to_char() to print localized month and day names.Bruce Momjian2006-02-12
| | | | Euler Taveira de Oliveira
* Allow to_char(interval) and to_char(time) to use AM/PM specifications.Bruce Momjian2005-12-03
| | | | | | | | | | | Map them to a single day, so '30 hours' is 'AM'. Have to_char(interval) and to_char(time) use "HH", "HH12" as 12-hour intervals, rather than bypass and print the full interval hours. This is neeeded because to_char(time) is mapped to interval in this function. Intervals should use "HH24", and document suggestion. Allow "D" format specifiers for interval/time.
* Re-run pgindent, fixing a problem where comment lines after a blankBruce Momjian2005-11-22
| | | | | | | | | comment line where output as too long, and update typedefs for /lib directory. Also fix case where identifiers were used as variable names in the backend, but as typedefs in ecpg (favor the backend for indenting). Backpatch to 8.1.X.
* Adjust not-too-sane calculation of DDD value for to_char(interval).Tom Lane2005-10-20
| | | | Per gripe from Chris Matheson.
* Standard pgindent run for 8.1.Bruce Momjian2005-10-15
|
* Add hint for to_char(interval) invalid format specifications.Bruce Momjian2005-08-18
|
* Fix to_char(interval) to return proper year and century values.Bruce Momjian2005-08-18
| | | | | | | | Fix to_char(interval) to return large year/month/day/hour values that are larger than possible timestamp values. Prevent to_char(interval) format specifications that make no sense, like Month. Clean up formatting.c code to more logically handle return lengths.
* More formatting.c cleanups.Bruce Momjian2005-08-17
|
* Small cleanup.Bruce Momjian2005-08-17
|
* Adjust to_char/from_char code to use boolean "is_to_char" rather thanBruce Momjian2005-08-17
| | | | integer with flags.
* Fix a few macro definitions to ensure that unary minus is enclosed inNeil Conway2005-07-27
| | | | | parentheses. This avoids possible operator precedence problems, and is consistent with most of the macro definitions in the tree.
* Andrew pointed out that the current fix didn't handle dates that wereBruce Momjian2005-07-23
| | | | | | | | | | | near daylight savings time boudaries. This handles it properly, e.g. test=> select '2005-04-03 04:00:00'::timestamp at time zone 'America/Los_Angeles'; timezone ------------------------ 2005-04-03 07:00:00-04 (1 row)
* Add time/date macros for code clarity:Bruce Momjian2005-07-21
| | | | | | | #define DAYS_PER_YEAR 365.25 #define MONTHS_PER_YEAR 12 #define DAYS_PER_MONTH 30 #define HOURS_PER_DAY 24
* Add 'day' field to INTERVAL so 1 day interval can be distinguished fromBruce Momjian2005-07-20
| | | | | | | | | | | | | | | | 24 hours. This is very helpful for daylight savings time: select '2005-05-03 00:00:00 EST'::timestamp with time zone + '24 hours'; ?column? ---------------------- 2005-05-04 01:00:00-04 select '2005-05-03 00:00:00 EST'::timestamp with time zone + '1 day'; ?column? ---------------------- 2005-05-04 01:00:00-04 Michael Glaesemann
* Code cleanup: remove 3 duplicate static function declarations.Neil Conway2005-06-24
|
* More trivial dead code removal: in int_to_roman(), checking for "num == -1"Neil Conway2005-06-22
| | | | | | | | is redundant after a check has already been made for "num < 0". The "set" variable can also be removed, as it is now no longer used. Per checking with Karel, this is the right fix. Per Coverity static analysis performed by EnterpriseDB.
* This patch makes it possible to use the full set of timezones when doingBruce Momjian2005-06-15
| | | | | | | | | | | | | | | | | | "AT TIME ZONE", and not just the shorlist previously available. For example: SELECT CURRENT_TIMESTAMP AT TIME ZONE 'Europe/London'; works fine now. It will also obey whatever DST rules were in effect at just that date, which the previous implementation did not. It also supports the AT TIME ZONE on the timetz datatype. The whole handling of DST is a bit bogus there, so I chose to make it use whatever DST rules are in effect at the time of executig the query. not sure if anybody is actuallyi *using* timetz though, it seems pretty unpredictable just because of this... Magnus Hagander
* Add parentheses to macros when args are used in computations. WithoutBruce Momjian2005-05-25
| | | | them, the executation behavior could be unexpected.
* Prevent to_char(interval) from dumping core on month-related formatsTom Lane2005-03-26
| | | | | | when a zero-month interval is given. Per discussion with Karel. Also, some desultory const-labeling of constant tables. More could be done along that line.
* Fix to_date to behave reasonably when CC and YY fields are both used.Tom Lane2005-03-25
| | | | Karel Zak
* Remove unportable assumption that it's okay to use the target bufferTom Lane2005-01-13
| | | | | of an sprintf() as a source string. Demonstrably does not work with recent gcc and/or glibc on some platforms.
* Update copyrights that were missed.Bruce Momjian2005-01-01
|
* Fix unportable isdigit() call --- must cast arg to unsigned char.Tom Lane2004-11-20
|
* Update comment to point to proper file.Bruce Momjian2004-11-01
|
* Fix to_number for the case of a trailing S.Tom Lane2004-10-28
| | | | Karel Zak
* More minor cosmetic improvements:Neil Conway2004-10-13
| | | | | | | | | | - remove another senseless "extern" keyword that was applied to a function definition - change a foo more function signatures from "some_type foo()" to "some_type foo(void)" - rewrite another K&R style function definition - make the type of the "action" function pointer in the KeyWord struct in src/backend/utils/adt/formatting.c more precise
* Another pgindent run with lib typedefs added.Bruce Momjian2004-08-30
|
* Pgindent run for 8.0.Bruce Momjian2004-08-29
|
* Update copyright to 2004.Bruce Momjian2004-08-29
|
* Integrate src/timezone library for all platforms. There is more we canTom Lane2004-05-21
| | | | | | and should do now that we control our own destiny for timezone handling, but this commit gets the bulk of the picayune diffs in place. Magnus Hagander and Tom Lane.
* Solve the 'Turkish problem' with undesirable locale behavior for caseTom Lane2004-05-07
| | | | | | | | | | | | | conversion of basic ASCII letters. Remove all uses of strcasecmp and strncasecmp in favor of new functions pg_strcasecmp and pg_strncasecmp; remove most but not all direct uses of toupper and tolower in favor of pg_toupper and pg_tolower. These functions use the same notions of case folding already developed for identifier case conversion. I left the straight locale-based folding in place for situations where we are just manipulating user data and not trying to match it to built-in strings --- for example, the SQL upper() function is still locale dependent. Perhaps this will prove not to be what's wanted, but at the moment we can initdb and pass regression tests in Turkish locale.