aboutsummaryrefslogtreecommitdiff
path: root/src/backend/tcop/postgres.c
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2003-03-20 06:03:00 +0000
committerBruce Momjian <bruce@momjian.us>2003-03-20 06:03:00 +0000
commitd7f10705b46a9c618b452e246d3d394e5a1a707f (patch)
tree83e95bb5fa9e07bfe85fe5829bc9e3e3ef4564a6 /src/backend/tcop/postgres.c
parentbe1c6e75293fac69453d2ca6fc99d642f7806dfa (diff)
downloadpostgresql-d7f10705b46a9c618b452e246d3d394e5a1a707f.tar.gz
postgresql-d7f10705b46a9c618b452e246d3d394e5a1a707f.zip
Attached is a patch that limits the range tested by horology to
what is capable using integer-datatime timestamps. It does attempt to exercise the maximum allowable timestamp range. Also is a small error check when converting a timestamp from external to internal format that prevents out of range timestamps from being entered. Files patched: Index: src/backend/utils/adt/timestamp.c Added range check to prevent out of range timestamps from being used. Index: src/test/regress/sql/horology.sql Index: src/test/regress/expected/horology-no-DST-before-1970.out Index: src/test/regress/expected/horology-solaris-1947.out Limited range of timestamps being checked to Jan 1, 4713 BC to Dec 31, 294276 In creating this patch, I have seen some definite problems with integer timestamps and how they react when used near their limits. For example, the following statement gives the correct result: SELECT timestamp without time zone 'Jan 1, 4713 BC' + interval '109203489 days' AS "Dec 31, 294276"; However, this statement which is the logical inverse of the above gives incorrect results: SELECT timestamp without time zone '12/31/294276' - timestamp without time zone 'Jan 1, 4713 BC' AS "109203489 Days"; John Cochran
Diffstat (limited to 'src/backend/tcop/postgres.c')
0 files changed, 0 insertions, 0 deletions