X-Original-To: pgsql-docs-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 4FF0DD1B432 for ; Tue, 2 Dec 2003 20:33:29 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 90312-08 for ; Tue, 2 Dec 2003 16:33:03 -0400 (AST) Received: from fuji.krosing.net (217-159-136-226-dsl.kt.estpak.ee [217.159.136.226]) by svr1.postgresql.org (Postfix) with ESMTP id C002DD1CA3E for ; Tue, 2 Dec 2003 16:32:55 -0400 (AST) Received: from fuji.krosing.net (localhost.localdomain [127.0.0.1]) by fuji.krosing.net (8.12.8/8.12.8) with ESMTP id hB2KWtdD004835; Tue, 2 Dec 2003 22:32:56 +0200 Received: (from hannu@localhost) by fuji.krosing.net (8.12.8/8.12.8/Submit) id hB2KWs1o004833; Tue, 2 Dec 2003 22:32:54 +0200 X-Authentication-Warning: fuji.krosing.net: hannu set sender to hannu@tm.ee using -f Subject: Re: Inserting timestamp values From: Hannu Krosing To: Tom Lane Cc: cnliou@so-net.net.tw, pgsql-docs@postgresql.org In-Reply-To: <17289.1070383257@sss.pgh.pa.us> References: <1070382243.61976.cnliou@so-net.net.tw> <17289.1070383257@sss.pgh.pa.us> Content-Type: text/plain Content-Transfer-Encoding: 7bit Message-Id: <1070397173.4788.1.camel@fuji.krosing.net> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 Date: Tue, 02 Dec 2003 22:32:53 +0200 X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200312/14 X-Sequence-Number: 2174 Tom Lane kirjutas T, 02.12.2003 kell 18:40: > "cnliou" writes: > > Does my test result comply with the statements in section > > "8.5 Date/Time Types"? > > I think so. You are inserting into a timestamp-with-time-zone column, > so even though you mark the literal constant as timestamp without time > zone, it's going to be converted to timestamp with time zone. Maybe he is wondering about it getting converted to +8 time zone even when the time zone is 'unknown' : > but my test results seem to show the other way. > > db1=# show time zone; > TimeZone > ---------- > unknown > (1 row) > > db1=# \d test > Table "public.test" > Column | Type | Modifiers > --------+--------------------------+----------- > f1 | timestamp with time zone | > > db1=# insert into test values ('2003-1-1'::timestamp); > INSERT 46230 1 > db1=# select * from test; > f1 > ------------------------ > 2003-01-01 00:00:00+08