Re: Daylight Savings Time handling on persistent connections

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Daylight Savings Time handling on persistent connections
Дата
Msg-id 28931.1099244851@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Daylight Savings Time handling on persistent connections  (Randall Nortman <postgreslists@wonderclown.com>)
Ответы Re: Daylight Savings Time handling on persistent connections  (Randall Nortman <postgreslists@wonderclown.com>)
Список pgsql-general
Randall Nortman <postgreslists@wonderclown.com> writes:
> I can't reproduce the error without messing up my clock, but from my
> logs, here's the text of the SQL sent to the server:

> insert into sensor_readings_numeric (sensor_id, reading_ts, reading,
> min, max) values (3, '2004-10-31 01:00:00', 0.540602, 0.519071837254,
> 0.551811824539)

> And this came back:
> ERROR:  duplicate key violates unique constraint "sensor_readings_numeric_pkey"

Hmm ... and you were generating that timestamp string how exactly?
I suspect that you actually sent the same timestamp string twice, one
hour apart, in which case I'd have to call this an application bug.
You really need to include the timezone specification in order to
have an unambiguous timestamp string.  It doesn't have to be UTC as you
previously suggested, but it does have to be labeled with the intended
zone.

            regards, tom lane

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

Предыдущее
От: Vinko Vrsalovic
Дата:
Сообщение: Re: Superuser log-in through a web interface?
Следующее
От: Randall Nortman
Дата:
Сообщение: Re: Daylight Savings Time handling on persistent connections