Re: New to_timestamp implementation is pretty strict - Mailing list pgsql-hackers

From Robert Haas
Subject Re: New to_timestamp implementation is pretty strict
Date
Msg-id 603c8f070812010746ufa66e15n8e7a8a09149c94e5@mail.gmail.com
Whole thread Raw
In response to Re: New to_timestamp implementation is pretty strict  ("Greg Stark" <stark@enterprisedb.com>)
Responses Re: New to_timestamp implementation is pretty strict
Re: New to_timestamp implementation is pretty strict
List pgsql-hackers
On Mon, Dec 1, 2008 at 10:33 AM, Greg Stark <stark@enterprisedb.com> wrote:
> How would you parse an input format of just 'SS' ? is there something
> ambiguous about '3' ? I don't see anything "bad" about using %d to
> output an integer number of seconds.

+1.

It seems to me that it's pretty silly to say that we "know" that the 2
in "01:2:03" is intended to mean 02, but we are somehow confused about
whether the 3 in "01:02:3" is intended to mean 03 or 30.  Sure, the
latter could be the result of a truncation, but if the user is
randomly truncating their strings, they're going to have problems with
a lot more than to_timestamp().

...Robert


pgsql-hackers by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: Re: [COMMITTERS] pgsql: Add support for matching wildcard server certificates to the new
Next
From: Andrew Dunstan
Date:
Subject: Re: New to_timestamp implementation is pretty strict