From: | "Dave Page" <dpage(at)pgadmin(dot)org> |
---|---|
To: | "David E(dot) Wheeler" <david(at)kineticode(dot)com> |
Cc: | "Heikki Linnakangas" <heikki(dot)linnakangas(at)enterprisedb(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: New to_timestamp implementation is pretty strict |
Date: | 2008-12-01 14:55:12 |
Message-ID: | 937d27e10812010655h971b1cbq84d8d08e35adc21c@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, Dec 1, 2008 at 2:45 PM, David E. Wheeler <david(at)kineticode(dot)com> wrote:
> On Dec 1, 2008, at 1:08 PM, Heikki Linnakangas wrote:
>
>> 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?
>
> I'm generally in favor of being generous in the input one can accept, but in
> this case it seems ambiguous to me. Is that supposed to be :30 or :03?
> There's no way to tell.
How is it ambiguous? The leading zero is technically redundant. A
trailing on most certainly isn't.
--
Dave Page
EnterpriseDB UK: http://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | David E. Wheeler | 2008-12-01 14:56:52 | Re: New to_timestamp implementation is pretty strict |
Previous Message | Tom Lane | 2008-12-01 14:52:21 | Re: New to_timestamp implementation is pretty strict |