Re: nasty problem with redhat 6.2 + pg 7.02 - Mailing list pgsql-general

From leonbloy@sinectis.com.ar
Subject Re: nasty problem with redhat 6.2 + pg 7.02
Date
Msg-id 200009191844.PAA14407@dolores.sinectis.com.ar
Whole thread Raw
In response to nasty problem with redhat 6.2 + pg 7.02  (leonbloy@sinectis.com.ar)
Responses Re: nasty problem with redhat 6.2 + pg 7.02  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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 by date:

Previous
From: "Steven Lacroix"
Date:
Subject: Large Objects
Next
From: Peter Eisentraut
Date:
Subject: Re: binary operators on integers