Re: [HACKERS] Copy from/to asymmetry - Mailing list pgsql-hackers

From Thomas Lockhart
Subject Re: [HACKERS] Copy from/to asymmetry
Date
Msg-id 387F3CC6.73F6BA7C@alumni.caltech.edu
Whole thread Raw
In response to Re: [HACKERS] Copy from/to asymmetry  (Michael Robinson <robinson@netrinsics.com>)
List pgsql-hackers
> The GMT+8 format is part of the POSIX standard (at least according to
> the zoneinfo source file).  In the meantime, I've created a new zoneinfo
> file with ISO "+0800" format, as a workaround.  (To make matters worse, I
> discovered that POSIX GMT+8 == ISO -0800 ; in other words, the semantics of
> the sign character are reversed in the two standards.)

Yuck.

> Perhaps, if the system supports strptime(), this function could be used as
> a last-ditch effort by ParseDateTime before returning an error.  That would
> solve all cases where the datetime_in timezone equals the system timezone
> setting.

How? strptime() needs a formatting string, so you would somehow need
to set it beforehand to *exactly* the correct value. And...

> Or, maybe just use strptime() outright.  I don't know, it's just a suggestion.

The other problem with using system-supplied routines for this is that
they invariably fail for years outside the Unix system time range. So
we need to do enough parsing to figure out what the year might be, and
by that time we may as well finish it ourselves...

Anyway, I'll be looking at it sometime soon.
                      - Thomas

-- 
Thomas Lockhart                lockhart@alumni.caltech.edu
South Pasadena, California


pgsql-hackers by date:

Previous
From: Karel Zak - Zakkr
Date:
Subject: locale vs. regress
Next
From: Thomas Lockhart
Date:
Subject: Re: [HACKERS] Re: Informix and OUTER join syntax