Re: nasty problem with redhat 6.2 + pg 7.02

From: leonbloy(at)sinectis(dot)com(dot)ar
To: pgsql-general(at)postgresql(dot)org
Subject: Re: nasty problem with redhat 6.2 + pg 7.02
Date: 2000-09-19 18:44:15
Message-ID: 200009191844.PAA14407@dolores.sinectis.com.ar
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Well, I've tracked down the problem to its
mininal form, I think:

Here it goes:

[postgres(at)bert postgres]$ createdb test5
CREATE DATABASE
[postgres(at)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(at)bert postgres]$ createdb test6
CREATE DATABASE
[postgres(at)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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Steven Lacroix 2000-09-19 19:00:02 Large Objects
Previous Message Edward Q. Bridges 2000-09-19 18:21:43 Re: error compiling plperl