Re: Timestamp trouble - Mailing list pgsql-novice

From Daniel T. Staal
Subject Re: Timestamp trouble
Date
Msg-id 54989.63.172.115.138.1118249989.squirrel@MageHandbook.com
Whole thread Raw
In response to Timestamp trouble  (Razvan Costea-Barlutiu <cbrazvan@laitek.com>)
List pgsql-novice
Razvan Costea-Barlutiu said:
> Hello all,
>
> I am getting hit by errors in timestamp formatting on seemingly valid
> timestamps:
> 19990108040506.
>
>  From the PG manual:
>
> <Valid input for the time stamp types consists of a concatenation of a
> date and a time, followed by an optional time zone, followed by an
> optional AD or BC. (Alternatively, AD/BC can appear before the time zone,
> but this is not the preferred ordering.)>
>
> The string above is the concatenation of two ISO 8601 date+time fields but
> still, the error is thrown each time.
>
> Is this a bug or is it a workaround for this?

Here is the actual parse order for date and time fields:
http://www.postgresql.org/docs/8.0/interactive/datetime-appendix.html

From that, I wouldn't see how it would figure out to parse a 12 digit
field.  I'd suggest breaking it down a little: putting a space in between
the date and time would probably be enough of a hint.

Daniel T. Staal

------------------------------------------------------------------------
This email copyright the author.  Unless otherwise noted, you are
expressly allowed to retransmit, quote, or otherwise use the contents
for non-commercial purposes.  This copyright will expire 5 years after
the author's death, or in 30 years, whichever is longer, unless such a
period is in excess of local copyright law.
------------------------------------------------------------------------

pgsql-novice by date:

Previous
From: Bruno Wolff III
Date:
Subject: Re: Timestamp trouble
Next
From: Razvan Costea-Barlutiu
Date:
Subject: Re: Timestamp trouble