Search Postgresql Archives

Re: timezone() with timeofday() converts the wrong direction?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Apr 24, 2005 at 04:34:31PM -0600, Michael Fuhr wrote:

> > gnumed=> select version();
> >                             version                            
> > ---------------------------------------------------------------
> >  PostgreSQL 7.1.3 on i686-pc-linux-gnu, compiled by GCC 2.95.3
> 
> That *definitely* isn't anything I'd want.  That version of PostgreSQL
Well :-)

> > gnumed=> create teable test (f timestamp with time zone);
> > CREATE
> 
> Does that really work in 7.1.3?  Trying to create a "teable" fails
This results from "script" logging backspaces into the log
file instead of deleting characters in there and my not
spotting that when cleaning up the log file. Nothing to do with
the question at hand.

>   insert into test (f) values (now());
>   INSERT 37830 1
>   SELECT * from test;
>                  f               
>   -------------------------------
>    2005-04-24 22:25:51.669218+00
>   (1 row)
>   
>   select f, f::timestamp at time zone 'MEZ' from test;
>                  f               |          timezone          
>   -------------------------------+----------------------------
>    2005-04-24 22:25:51.669218+00 | 2005-04-24 23:25:51.669218
>   (1 row)
Huh ? This IS different time zones from the same timestamp
within the same query, isn't it ??

The fact that different versions of PostgreSQL get it right or
wrong in a variety of ways indicates that the logic may need
to be fixed but does show that in principle it is quite
possible. If that's not what you wanted to do then I did
misunderstand your original question.

Karsten
-- 
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
    (send "unregister YourEmailAddressHere" to majordomo@xxxxxxxxxxxxxx)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux