postgresql/src/backend
Tom Lane f2ba1e994c Avoid unexpected conversion overflow in planner for distant date values.
The "date" type supports a wider range of dates than int64 timestamps do.
However, there is pre-int64-timestamp code in the planner that assumes that
all date values can be converted to timestamp with impunity.  Fortunately,
what we really need out of the conversion is always a double (float8)
value; so even when the date is out of timestamp's range it's possible to
produce a sane answer.  All we need is a code path that doesn't try to
force the result into int64.  Per trouble report from David Rericha.

Back-patch to all supported versions.  Although this is surely a corner
case, there's not much point in advertising a date range wider than
timestamp's if we will choke on such values in unexpected places.
2010-12-28 22:49:57 -05:00
..
access Remove quotes from boolean recovery.conf.sample parameters, now that the 2010-12-24 11:51:51 -05:00
bootstrap Generalize concept of temporary relations to "relation persistence". 2010-12-13 12:34:26 -05:00
catalog Generalize concept of temporary relations to "relation persistence". 2010-12-13 12:34:26 -05:00
commands Generalize concept of temporary relations to "relation persistence". 2010-12-13 12:34:26 -05:00
executor Fix typos. 2010-12-21 17:58:53 -05:00
foreign Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
lib Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
libpq Make GUC variables for syslog and SSL always visible 2010-12-18 16:53:59 +01:00
main Only build in crashdump support on Windows if there's a working dbghelp.h. 2010-12-26 10:34:47 -05:00
nodes Use memcmp() rather than strncmp() when shorter string length is known. 2010-12-21 22:11:40 -05:00
optimizer Fix up handling of simple-form CASE with constant test expression. 2010-12-19 15:30:44 -05:00
parser Generalize concept of temporary relations to "relation persistence". 2010-12-13 12:34:26 -05:00
po Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
port Only build in crashdump support on Windows if there's a working dbghelp.h. 2010-12-26 10:34:47 -05:00
postmaster Remove unnecessary definition for autovacuum in SignalSomeChildren. 2010-12-17 15:59:19 -03:00
regex Fix comparisons of pointers with zero to compare with NULL instead. 2010-10-29 15:51:52 -04:00
replication Allow bidirectional copy messages in streaming replication mode. 2010-12-11 09:27:37 -05:00
rewrite Object access hook framework, with post-creation hook. 2010-11-25 11:50:13 -05:00
snowball Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
storage Work around unfortunate getppid() behavior on BSD-ish systems. 2010-12-21 06:30:32 -05:00
tcop set_ps_display when calling functions via fastpath 2010-12-17 18:51:22 -03:00
tsearch Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
utils Avoid unexpected conversion overflow in planner for distant date values. 2010-12-28 22:49:57 -05:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
Makefile Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
common.mk Improved parallel make support 2010-11-12 22:15:16 +02:00
nls.mk Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00