Skip site navigation (1) Skip section navigation (2)

pgsql: Fix range check in date_recv that tried to limit accepted values

From: heikki(at)postgresql(dot)org (Heikki Linnakangas)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix range check in date_recv that tried to limit accepted values
Date: 2009-10-26 16:13:11
Message-ID: 20091026161311.3DF28753FB7@cvs.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-committers
Log Message:
-----------
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.

Modified Files:
--------------
    pgsql/src/backend/utils/adt:
        date.c (r1.148 -> r1.149)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/date.c?r1=1.148&r2=1.149)
    pgsql/src/include/utils:
        datetime.h (r1.76 -> r1.77)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/utils/datetime.h?r1=1.76&r2=1.77)

pgsql-committers by date

Next:From: Peter EisentrautDate: 2009-10-26 21:11:22
Subject: pgsql: Check errors in for loop
Previous:From: Tom LaneDate: 2009-10-26 02:26:52
Subject: pgsql: Re-implement EvalPlanQual processing to improve its performance

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group