postgresql/src
Tom Lane 147bbc90f7 Modernize to_char's Roman-numeral code, fixing overflow problems.
int_to_roman() only accepts plain "int" input, which is fine since
we're going to produce '###############' for any value above 3999
anyway.  However, the numeric and int8 variants of to_char() would
throw an error if the given input exceeded the integer range, while
the float-input variants invoked undefined-per-C-standard behavior.
Fix things so that you uniformly get '###############' for out of
range input.

Also add test cases covering this code, plus the equally-untested
EEEE, V, and PL format codes.

Discussion: https://postgr.es/m/2956175.1725831136@sss.pgh.pa.us
2024-09-26 11:02:31 -04:00
..
backend Modernize to_char's Roman-numeral code, fixing overflow problems. 2024-09-26 11:02:31 -04:00
bin Remove extra whitespace in pg_upgrade status message. 2024-09-25 11:18:56 -05:00
common jsonapi: fix memory leakage during OOM error recovery. 2024-09-23 12:30:51 -04:00
fe_utils Prevent mis-encoding of "trailing junk after numeric literal" errors. 2024-09-05 12:42:33 -04:00
include Update oid for pg_wal_replay_wait() procedure 2024-09-26 11:49:41 +03:00
interfaces Add PQfullProtocolVersion() to surface the precise protocol version. 2024-09-09 11:54:55 -04:00
makefiles Add -Wmissing-variable-declarations to the standard compilation flags 2024-08-03 11:51:02 +02:00
pl Don't bother checking the result of SPI_connect[_ext] anymore. 2024-09-09 12:18:34 -04:00
port Only perform pg_strong_random init when required 2024-09-02 13:52:27 +02:00
template thread-safety: gmtime_r(), localtime_r() 2024-08-23 07:43:04 +02:00
test Modernize to_char's Roman-numeral code, fixing overflow problems. 2024-09-26 11:02:31 -04:00
timezone Update time zone data files to tzdata release 2024a. 2024-02-01 15:57:53 -05:00
tools Add further excludes to headerscheck 2024-09-24 20:41:47 +02:00
tutorial Update copyright for 2024 2024-01-03 20:49:05 -05:00
.gitignore
DEVELOPERS
Makefile Remove distprep 2023-11-06 15:18:04 +01:00
Makefile.global.in Add -Wmissing-variable-declarations to the standard compilation flags 2024-08-03 11:51:02 +02:00
Makefile.shlib Remove AIX support 2024-02-28 15:17:23 +04:00
meson.build Update copyright for 2024 2024-01-03 20:49:05 -05:00
nls-global.mk Remove distprep 2023-11-06 15:18:04 +01:00