OSDN Git Service

Fix range check in date_recv that tried to limit accepted values to only
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Mon, 26 Oct 2009 16:13:11 +0000 (16:13 +0000)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Mon, 26 Oct 2009 16:13:11 +0000 (16:13 +0000)
commit2078e384a3ac148b48973c0d67bce90d5792fe3b
tree668cbbcc3867e4ca1a22372ee9b2f3396bae71cc
parent9f2ee8f287098fb8067593b38da0650df458b20a
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.
src/backend/utils/adt/date.c
src/include/utils/datetime.h