Re: BUG #17794: dates with zero or negative years are not accepted
В списке pgsql-bugs по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: BUG #17794: dates with zero or negative years are not accepted |
| Дата | |
| Msg-id | 2137695.1676500618@sss.pgh.pa.us обсуждение |
| Ответ на | Re: BUG #17794: dates with zero or negative years are not accepted (David Rowley <dgrowleyml@gmail.com>) |
| Список | pgsql-bugs |
David Rowley <dgrowleyml@gmail.com> writes:
> From an implementation point of view, it looks trivial to just allow
> 0000 to mean 1 BC, however, the situation is more complex for negative
> numbers as ParseDateTime() sees the negative sign and categorises that
> portion as a timezone. The parsing would have to be adjusted to make
> this be seen as a year, and that'll cause us to suddenly start
> interpreting date strings differently from what we do now, which risks
> breaking applications. I'm not sure that's worth the risk.
Yeah, the real problem is that getting '-' to be seen as part of the
year field will cause havoc in the parsing rules. I'd say if you
want this sort of input, use make_date() or make_timestamptz() rather
than going through string form.
regards, tom lane
В списке pgsql-bugs по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера