Re: nasty problem with redhat 6.2 + pg 7.02

Поиск
Список
Период
Сортировка
От leonbloy@sinectis.com.ar
Тема Re: nasty problem with redhat 6.2 + pg 7.02
Дата
Msg-id 200009191844.PAA14407@dolores.sinectis.com.ar
обсуждение исходный текст
Ответ на nasty problem with redhat 6.2 + pg 7.02  (leonbloy@sinectis.com.ar)
Ответы Re: nasty problem with redhat 6.2 + pg 7.02  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Well, I've tracked down the problem to its
mininal form, I think:

Here it goes:

[postgres@bert postgres]$ createdb test5
CREATE DATABASE
[postgres@bert postgres]$ psql test5
Welcome to psql, the PostgreSQL interactive terminal.

Type:  \copyright for distribution terms
       \h for help with SQL commands
       \? for help on internal slash commands
       \g or terminate with semicolon to execute query
       \q to quit

test5=# select '01-10-2000'::date;
  ?column?
------------
 01-10-2000
(1 row)

test5=# select '13-10-2000'::date;
  ?column?
------------
 13-10-2000
(1 row)

test5=# select '01-10-2000'::date;
  ?column?
------------
 30-09-2000
(1 row)

Strange, isnt' it ?
Also:

[postgres@bert postgres]$ createdb test6
CREATE DATABASE
[postgres@bert postgres]$ psql test6
Welcome to psql, the PostgreSQL interactive terminal.

Type:  \copyright for distribution terms
       \h for help with SQL commands
       \? for help on internal slash commands
       \g or terminate with semicolon to execute query
       \q to quit

test6=# select '01-10-2000'::date::timestamp;
           ?column?
------------------------------
 Sat 30 Sep 23:00:00 2000 ART
(1 row)

test6=# select '13-10-2000'::date::timestamp;
           ?column?
-------------------------------
 Fri 13 Oct 00:00:00 2000 ARST
(1 row)

test6=# select '01-10-2000'::date::timestamp;
           ?column?
------------------------------
 Sat 30 Sep 00:00:00 2000 ART
(1 row)


The first result (30 sept 23:00:00) is obviously due to
a timezone-daylight saving issue.
But why postgresql throws a different result afterwards,
is more than I can explain.

Cheers

Hernan



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

Предыдущее
От: "Steven Lacroix"
Дата:
Сообщение: Large Objects
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: binary operators on integers