for what it's worth, when i run these two tests, i
get the correct results
i'm using RedHat 6.2 also.
here are more details:
[ebridges@sleeepy]$ uname -a
Linux sleeepy 2.2.16 #2 SMP Mon Jul 31 14:51:33 EDT 2000 i686 unknown
[ebridges@sleeepy]$ psql -V
psql (PostgreSQL) 7.0.2
Portions Copyright (c) 1996-2000, PostgreSQL, Inc
.
.
.
i compiled/installed postgres from a tarball. are you
using the RPM? or did you compile from scratch?
if the former, perhaps it's a bug in the redhat binary rpm.
HTH
--e--
On Tue, 19 Sep 2000 15:44:15 -0300, leonbloy@sinectis.com.ar wrote:
> 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
>
>
>