postgresql/src/backend
Tom Lane 5db5146431 Fix j2day() to behave sanely for negative Julian dates.
Somebody had apparently once figured that casting to unsigned int would
produce the right output for negative inputs, but that would only be
true if 2^32 were a multiple of 7, which of course it ain't.  We need
to use a signed division and then correct the sign of the remainder.

AFAICT, the only case where this would arise currently is when doing
ISO-week calculations for dates in 4714BC, where we'd compute a
negative Julian date representing 4714-01-04BC and then do some
arithmetic with it.  Since we don't even really document support for
such dates, this is not of much consequence.  But we may as well
get it right.

Per report from Vitaly Burovoy.
2016-03-16 20:57:45 -04:00
..
access Fix typos. 2016-03-15 18:06:11 -04:00
bootstrap Provide much better wait information in pg_stat_activity. 2016-03-10 12:44:09 -05:00
catalog Add simple VACUUM progress reporting. 2016-03-15 13:32:56 -04:00
commands Fix problems in commit c16dc1aca5. 2016-03-16 13:54:04 -04:00
executor Avoid incorrectly indicating exclusion constraint wait 2016-03-15 18:04:39 -04:00
foreign Remove a couple of useless pstrdup() calls. 2016-03-09 23:29:05 -05:00
lib Add two HyperLogLog functions 2016-01-19 17:40:15 -03:00
libpq Fix typos. 2016-03-15 18:06:11 -04:00
main Avoid crash on old Windows with AVX2-capable CPU for VS2013 builds 2016-03-10 14:10:18 +01:00
nodes Rethink representation of PathTargets. 2016-03-14 16:59:59 -04:00
optimizer Fix typos. 2016-03-15 18:06:11 -04:00
parser Fix typos. 2016-03-15 18:06:11 -04:00
po Translation updates 2015-06-28 23:56:55 -04:00
port Windows: Make pg_ctl reliably detect service status 2016-01-07 11:59:08 -03:00
postmaster Another comment update. 2016-03-16 14:28:25 -04:00
regex Suppress compiler warnings about useless comparison of unsigned to zero. 2016-02-15 17:12:16 -05:00
replication Provide much better wait information in pg_stat_activity. 2016-03-10 12:44:09 -05:00
rewrite Improve error message for rejecting RETURNING clauses with dropped columns. 2016-02-29 19:11:38 -05:00
snowball Update copyright for 2016 2016-01-02 13:33:40 -05:00
storage Add idle_in_transaction_session_timeout. 2016-03-16 11:30:45 -04:00
tcop Add idle_in_transaction_session_timeout. 2016-03-16 11:30:45 -04:00
tsearch Fix whitespace and remove obsolete gitattributes entry 2016-03-13 16:03:13 -04:00
utils Fix j2day() to behave sanely for negative Julian dates. 2016-03-16 20:57:45 -04:00
.gitignore Add .gitignore entries for AIX-specific intermediate build artifacts. 2015-07-08 20:44:22 -04:00
common.mk Remove maintainer-check target, fold into normal build 2013-10-10 20:11:56 -04:00
Makefile Add support for systemd service notifications 2016-02-02 21:04:29 -05:00
nls.mk Remove trailing slashes from directories in find command 2015-09-18 22:06:54 -04:00