X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 191D95352D for ; Thu, 24 Mar 2005 13:38:43 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 16829-09 for ; Thu, 24 Mar 2005 13:38:39 +0000 (GMT) Received: from sunsite.dcc.uchile.cl (sunsite.dcc.uchile.cl [192.80.24.2]) by svr1.postgresql.org (Postfix) with ESMTP id 663C953432 for ; Thu, 24 Mar 2005 13:38:37 +0000 (GMT) Received: from anakena.dcc.uchile.cl (anakena [192.80.24.6]) by sunsite.dcc.uchile.cl (8.12.11/8.12.11) with ESMTP id j2ODcMBL022118; Thu, 24 Mar 2005 09:38:23 -0400 (CLT) Received: by anakena.dcc.uchile.cl (Postfix, from userid 4151) id 718F852D15; Thu, 24 Mar 2005 09:38:22 -0400 (CLT) Date: Thu, 24 Mar 2005 09:38:22 -0400 From: Alvaro Herrera To: Enrico Weigelt Cc: pgsql-admin Subject: Re: cast not IMMUTABLE? Message-ID: <20050324133822.GC20726@dcc.uchile.cl> References: <26503.1083890514@sss.pgh.pa.us> <20050324131552.GB19555@nibiru.borg.metux.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050324131552.GB19555@nibiru.borg.metux.de> User-Agent: Mutt/1.5.6i X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.349 tagged_above=0 required=5 tests=AWL, DNS_FROM_RFC_ABUSE X-Spam-Level: X-Archive-Number: 200503/388 X-Sequence-Number: 16886 On Thu, Mar 24, 2005 at 02:15:52PM +0100, Enrico Weigelt wrote: > * Tom Lane wrote: > > > > > why that cast is not considered IMMUTABLE ? > > > > Because it depends on your TimeZone setting. Observe: > > BTW: whats really the difference between timezone and > timezonetz ? I always used to use timestamp (w/o tz) and > thought timestamptz was just an question of presentation. The difference is that timestamptz converts the value from your local timezone to UTC before storing; and at display time, it converts it back to the local timezone. So you can meaningfully compare data that was inserted on different timezones. Also, keep in mind that in past releases, "timestamp" was synonym for "timestamp with time zone", while right now it is synonym for "timestamp without time zone", and to get the former behavior you have to qualify it with "with time zone" or use "timestamptz". I think the switchover was made in 7.3 but I don't remember exactly. -- Alvaro Herrera () "When the proper man does nothing (wu-wei), his thought is felt ten thousand miles." (Lao Tse)