Fix range check in date_recv that tried to limit accepted values to only

Heikki Linnakangas <heikki.linnakangas@iki.fi>

Commit: 2078e384a3ac148b48973c0d67bce90d5792fe3b
Author: Heikki Linnakangas <heikki.linnakangas@iki.fi>
Date: 2009-10-26T16:13:11Z
Releases: 9.0.0
Fix range check in date_recv that tried to limit accepted values to only
those accepted by date_in(). I confused julian day numbers and number of
days since the postgres epoch 2000-01-01 in the original patch.

I just noticed that it's still easy to get such out-of-range values into
the database using to_date or +- operators, but this patch doesn't do
anything about those functions.

Per report from James Pye.

Files

PathChange+/−
src/backend/utils/adt/date.c modified +3 −2
src/include/utils/datetime.h modified +2 −2