Re: [HACKERS] Copy from/to asymmetry

From: Michael Robinson <robinson(at)netrinsics(dot)com>
To: lockhart(at)alumni(dot)caltech(dot)edu, robinson(at)netrinsics(dot)com
Cc: pgsql-hackers(at)hub(dot)org
Subject: Re: [HACKERS] Copy from/to asymmetry
Date: 2000-01-13 05:51:52
Message-ID: 200001130551.NAA77189@netrinsics.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)edu> writes:
>> EncodeDateTime,
>> on the other hand, blindly spits out whatever the operating system gives it
>> from localtime().
>
>Yup. afaik this is the only way to get daylight savings time info
>since there is no api to do so otherwise. Since this is the very first
>report of this style of timezone, I don't feel too guilty, and it will
>be easy to fix (I hope anyway).

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.)

>> 1. x == datetime_in(datetime_out(x)) should always be true for all valid x.

>Impossible to do apriori, given that we rely on the system to provide
>timezone info for output. However, we try to fix all unusual cases,
>and afaik there are no reasonable formats we have rejected for
>support.

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.

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

-Michael Robinson

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Meskes 2000-01-13 07:48:16 Re: [HACKERS] FETCH without FROM/IN
Previous Message Thomas Lockhart 2000-01-13 05:00:40 Re: [HACKERS] Re: Informix and OUTER join syntax