pgsql: Fix DecodeInterval to report an error for multiple occurrences of

Поиск
Список
Период
Сортировка
От tgl@postgresql.org (Tom Lane)
Тема pgsql: Fix DecodeInterval to report an error for multiple occurrences of
Дата
Msg-id 20090601165511.7E44A75331E@cvs.postgresql.org
обсуждение исходный текст
Список pgsql-committers
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.206)
    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)

В списке pgsql-committers по дате отправления:

Предыдущее
От: bmomjian@pgfoundry.org (User Bmomjian)
Дата:
Сообщение: pg-migrator - pg_migrator: Add windows.h include.
Следующее
От: bmomjian@pgfoundry.org (User Bmomjian)
Дата:
Сообщение: pg-migrator - pg_migrator: Handle Win32 MoveFile return value, per