Re: Timezone database changes

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема Re: Timezone database changes
Дата
Msg-id 470B79D6.EE98.0025.0@wicourts.gov
обсуждение исходный текст
Ответ на Re: Timezone database changes  (Bruce Momjian <bruce@momjian.us>)
Ответы Re: Timezone database changes  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers
>>> On Tue, Oct 9, 2007 at 12:11 PM, in message
<200710091711.l99HB9x15798@momjian.us>, Bruce Momjian <bruce@momjian.us> wrote:

> Trevor Talbot wrote:
>>
>> Actually, I'm used to knowing how PostgreSQL does it, but looking at
>> things again I remember some confusion I had when first encountering
>> the timestamp types.  I don't know what the SQL Standard says; is the
>> implication that "timestamp with time zone" actually stores the
>> literal time and the zone it is associated with?  (Would make more
>> sense, given the name.)
I don't see how the ANSI functionality can work without it.
>> If that's true, then the current behavior is a bug^H^H^Hdocumented
>> limitation.  I still don't know of anything practical that could be
>> done now, but...
>
> Do we need additional documention about this?
Probably, but we need a lot more than that to conform to the standard
and to avoid surprising behavior.  The first of the two statements
below is valid ANSI syntax to add one day to the current moment.  It
is accepted and generates the wrong value.  The second is the
PostgreSQL way.  It is one of many anomalies.
bigbird=> select current_timestamp, current_timestamp + interval '1' day;             now              |
?column?
-------------------------------+-------------------------------2007-10-09 12:47:18.876498-05 | 2007-10-09
12:47:18.876498-05
(1 row)

bigbird=> select current_timestamp, current_timestamp + interval '1 day';             now              |
?column?
-------------------------------+-------------------------------2007-10-09 12:47:20.190999-05 | 2007-10-10
12:47:20.190999-05
(1 row)
-Kevin



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: Skytools committed without hackers discussion/review
Следующее
От: Gregory Stark
Дата:
Сообщение: Re: type money causes unrestorable dump