| От | Tom Lane |
|---|---|
| Тема | Re: Historical dates in Timestamp |
| Дата | |
| Msg-id | 6253.986402213@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Historical dates in Timestamp ("Albert REINER" <areiner@tph.tuwien.ac.at>) |
| Список | pgsql-sql |
"Albert REINER" <areiner@tph.tuwien.ac.at> writes:
> Is it really reasonable to enforce that the number of years is four
> digits at least?
I believe so. Without that cue it's pretty difficult for the timestamp
parser even to figure out which field is intended to be the year, let
alone whether you'd like 1900 or 2000 added to a two-digit year value.
For example, with the default datestyle:
regression=# select '12-5-28'::timestamp; ?column?
------------------------2028-12-05 00:00:00-05
(1 row)
regression=# select '0012-5-28'::timestamp; ?column?
---------------------0012-05-28 00:00:00
(1 row)
regards, tom lane
В списке pgsql-sql по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера