From: | Karsten Hilbert <Karsten(dot)Hilbert(at)gmx(dot)net> |
---|---|
To: | postgres-general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: timezone() with timeofday() converts the wrong direction? |
Date: | 2005-04-25 06:28:47 |
Message-ID: | 20050425082847.A565@hermes.hilbert.loc |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2005-04-25 07:05:12 | Re: timezone() with timeofday() converts the wrong direction? |
Previous Message | ElayaRaja S | 2005-04-25 06:14:22 | Help-Urgent |