New to_timestamp implementation is pretty strict

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема New to_timestamp implementation is pretty strict
Дата
Msg-id 4933D3A7.702@enterprisedb.com
обсуждение исходный текст
Ответы Re: New to_timestamp implementation is pretty strict  ("David E. Wheeler" <david@kineticode.com>)
Re: New to_timestamp implementation is pretty strict  ("Brendan Jurd" <direvus@gmail.com>)
Список pgsql-hackers
I like strict in general, but this doesn't seem logical:

postgres=# SELECT to_timestamp('29-12-2005 01:2:03', 'DD-MM-YYYY 
HH24:MI:SS'); -- works      to_timestamp
------------------------ 2005-12-29 01:02:03+02
(1 row)

postgres=# SELECT to_timestamp('29-12-2005 01:02:3', 'DD-MM-YYYY 
HH24:MI:SS'); -- doesn't work
ERROR:  source string too short for "SS" formatting field
DETAIL:  Field requires 2 characters, but only 1 remain.
HINT:  If your source string is not fixed-width, try using the "FM" 
modifier.

I think the end of string should be treated like a field separator, 
colon in this example, and we should accept both of the above. Opinions?

--   Heikki Linnakangas  EnterpriseDB   http://www.enterprisedb.com


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

Предыдущее
От: Michael Meskes
Дата:
Сообщение: Looking for someone with MinGW
Следующее
От: "Pavel Stehule"
Дата:
Сообщение: Re: WIP: default values for function parameters