X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 127B5D1C9E4 for ; Thu, 14 Aug 2003 11:28:16 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 77535-05 for ; Thu, 14 Aug 2003 08:26:40 -0300 (ADT) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by svr1.postgresql.org (Postfix) with ESMTP id D6DA3D1C512 for ; Thu, 14 Aug 2003 08:28:04 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.9/8.12.9) with ESMTP id h7EBQkSa015438; Thu, 14 Aug 2003 07:26:46 -0400 (EDT) To: Jesse Scott Cc: Postgresql SQL Mailing List Subject: Re: Timezone troubles In-reply-to: <3F3B001B.8060506@wwc.edu> References: <3F3B001B.8060506@wwc.edu> Comments: In-reply-to Jesse Scott message dated "Wed, 13 Aug 2003 20:20:59 -0700" Date: Thu, 14 Aug 2003 07:26:46 -0400 Message-ID: <15437.1060860406@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200308/173 X-Sequence-Number: 14789 Jesse Scott writes: > lastlogin timestamp DEFAULT 'now', > firstlogin timestamp, > EXTRACT(EPOCH FROM lastlogin) AS lastlogin, > EXTRACT(EPOCH FROM firstlogin) AS firstlogin, Btw ... although you are hitting a bug in EXTRACT(), I think the above is pretty foolish. Timestamp without time zone is inherently not a well defined point in time --- its meaning depends on the eye of the beholder, or at least the timezone the beholder lives in. Timestamp with time zone is what you want for recording the true time of any well-defined event. (Defaulting "timestamp" to mean "without time zone" is one of the many bad decisions that have been forced on us by SQL spec compliance.) regards, tom lane