Re: Can LC_TIME affect timestamp input? - Mailing list pgsql-general

From Jasen Betts
Subject Re: Can LC_TIME affect timestamp input?
Date
Msg-id kekjo4$mjn$1@gonzo.reversiblemaps.ath.cx
Whole thread Raw
In response to Can LC_TIME affect timestamp input?  (Paul Jones <pbj@cmicdo.com>)
List pgsql-general
On 2013-01-28, Paul Jones <pbj@cmicdo.com> wrote:

>
> Since posting this, I tried digging around in the source code.  From looking at
> "timestamp_in" and related routines, it doesn't appear to take into account
> any LC_* environment var.  And I didn't see strftime(3) used for timestamps
> (although I could have missed it.)  Timestamp input seems hard-wired for the
> most part.

Strftime doesn't understand fractions of seconds, which makes it
unsuitable for postgres, also certian modern platforms have only
a primitive strftime, which is likely to cause headaches for developers.

Perhaps you could create a new type based on timestamp and write an input
function that fixes the DB2 output, you'd then be stuck with your new
type instead of the esisting one but it shouldn't be hard to make it
compatible.  (unless you want to attack the system tables to change it
in a non-standard way)


--
⚂⚃ 100% natural

pgsql-general by date:

Previous
From: Jasen Betts
Date:
Subject: Re: finding if a period is multiples of a given interval
Next
From: Jasen Betts
Date:
Subject: Re: Optimizing query?