pgsql: Fix DecodeInterval to report an error for multiple occurrences of
В списке pgsql-committers по дате отправления:
| От | 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 по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера