Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id AF74F475BF9; Tue, 26 Nov 2002 21:14:51 -0500 (EST) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id F2AD9475B07; Tue, 26 Nov 2002 21:14:50 -0500 (EST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.6/8.12.6) with ESMTP id gAR2EssX013006; Tue, 26 Nov 2002 21:14:54 -0500 (EST) To: "Rison, Stuart" Cc: "'pgsql-sql@postgresql.org'" , "'pgsql-bugs@postgresql.org'" Subject: Re: [SQL] [SQL/BUGS] (possible) inconsistent behaviour of timestamp? In-reply-to: <6BD8CE460CC6EE40B83DDFCED609F84BE140D8@cmnt4008.rvc.ac.uk> References: <6BD8CE460CC6EE40B83DDFCED609F84BE140D8@cmnt4008.rvc.ac.uk> Comments: In-reply-to "Rison, Stuart" message dated "Tue, 26 Nov 2002 13:54:03 +0000" Date: Tue, 26 Nov 2002 21:14:54 -0500 Message-ID: <13005.1038363294@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200211/166 X-Sequence-Number: 4948 "Rison, Stuart" writes: > The first SELECT returns a 'timestamp', but the next two return a > 'timestamptz' (presumably with timezone); is this inconsitent behaviour? Yes. It's a transitional behavior in 7.2: timestamp without any quotes is translated by the parser to timestamptz (ie, timestamp with time zone). Quotes suppress the renaming, however. We did that deliberately for one release to ease updating, because PG's old "datetime" datatype corresponds to timestamptz, not timestamp-without- time-zone. As of 7.3 that renaming doesn't happen any more, and undecorated timestamp means timestamp without time zone, per spec. Confused yet? I'm not sure that this update plan was really a great idea, but we agreed to it a release or two back, and we're sticking to it... regards, tom lane