Re: Can LC_TIME affect timestamp input?

From: Jasen Betts <jasen(at)xnet(dot)co(dot)nz>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Can LC_TIME affect timestamp input?
Date: 2013-02-03 02:58:12
Message-ID: kekjo4$mjn$1@gonzo.reversiblemaps.ath.cx
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 2013-01-28, Paul Jones <pbj(at)cmicdo(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jasen Betts 2013-02-03 03:03:34 Re: COPY table to file missing quotation marks
Previous Message Edson Richter 2013-02-03 02:25:01 Diferences between IN and EXISTS?