git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: f4ceed6) | patch
Fix assorted breakage in to_char()'s OF format option.
2016年3月17日 19:50:33 +0000 (15:50 -0400)
2016年3月17日 19:50:33 +0000 (15:50 -0400)
commit 55c3a04d60ccea9e999088fb847ceeb9fd4dd927
Fix assorted breakage in to_char()'s OF format option.

In HEAD, fix incorrect field width for hours part of OF when tm_gmtoff is
negative. This was introduced by commit 2d87eedc1d4468d3 as a result of
falsely applying a pattern that's correct when + signs are omitted, which
is not the case for OF.

In 9.4, fix missing abs() call that allowed a sign to be attached to the
minutes part of OF. This was fixed in 9.5 by 9b43d73b3f9bef27, but for
inscrutable reasons not back-patched.

In all three versions, ensure that the sign of tm_gmtoff is correctly
reported even when the GMT offset is less than 1 hour.

Add regression tests, which evidently we desperately need here.

Thomas Munro and Tom Lane, per report from David Fetter
src/backend/utils/adt/formatting.c diff | blob | blame | history
src/test/regress/expected/timestamptz.out diff | blob | blame | history
src/test/regress/sql/timestamptz.sql diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /