pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: tgl@postgresql.org
To: pgsql-committers@postgresql.org
Subject: pgsql: Fix DecodeInterval to report an error for multiple occurrences of
Date: Mon,  1 Jun 2009 16:55:11 +0000 (UTC)
Message-ID: <20090601165511.7E44A75331E@cvs.postgresql.org> (raw)

Log Message:
-----------
Fix DecodeInterval to report an error for multiple occurrences of DAY, WEEK,
YEAR, DECADE, CENTURY, or MILLENIUM fields, just as it always has done for
other types of fields.  The previous behavior seems to have been a hack to
avoid defining bit-positions for all these field types in DTK_M() masks,
rather than something that was really considered to be desired behavior.
But there is room in the masks for these, and we really need to tighten up
at least the behavior of DAY and YEAR fields to avoid unexpected behavior
associated with the 8.4 changes to interpret ambiguous fields based on the
interval qualifier (typmod) value.  Per my example and proposed patch.

Modified Files:
--------------
    pgsql/src/backend/utils/adt:
        datetime.c (r1.205 -> r1.206)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/datetime.c?r1=1.205&r2=1.20...)
    pgsql/src/include/utils:
        datetime.h (r1.73 -> r1.74)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/utils/datetime.h?r1=1.73&r2=1.74)




view thread (4+ messages)  latest in thread

Message-ID: <20090601165511.7E44A75331E@cvs.postgresql.org>
Permalink:  ../20090601165511.7E44A75331E@cvs.postgresql.org/
Also on:    postgresql.org/message-id/20090601165511.7E44A75331E@cvs.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: tgl@postgresql.org
  Subject: Re: pgsql: Fix DecodeInterval to report an error for multiple occurrences of
  In-Reply-To: <20090601165511.7E44A75331E@cvs.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox