X-Original-To: pgsql-sql@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 733274758E6 for ; Thu, 6 Feb 2003 06:04:34 -0500 (EST) Received: from web80303.mail.yahoo.com (web80303.mail.yahoo.com [66.218.79.19]) by postgresql.org (Postfix) with SMTP id C376A4758E1 for ; Thu, 6 Feb 2003 06:04:33 -0500 (EST) Message-ID: <20030206110435.27538.qmail@web80303.mail.yahoo.com> Received: from [203.87.150.116] by web80303.mail.yahoo.com via HTTP; Thu, 06 Feb 2003 03:04:35 PST Date: Thu, 6 Feb 2003 03:04:35 -0800 (PST) From: Ludwig Lim Subject: TIME vs. TIMESTAMP data type To: PostgreSQL Mailing List MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200302/110 X-Sequence-Number: 11508 Hi: Are there cases when a TIME data type is a better choice over the TIMESTAMP data type? It seems that PostgreSQL (I'm using 7.2.3) encourage its users to use TIMESTAMP over TIME data type. I said this because of the following: a) More functions for DATE and TIMESTAMP data types such as to_date() and to_timestamp(). Howver, function to_time() does not exist. b) Same amount of storage for TIMESTAMP and for TIME. Time with time zone even need more storage space than a timestamp (12 bytes vs. 8 bytes). c) It's harder to TIMESTAMP to TIME and vice versa, while its easier to cast TIMESTAMP to DATE and vice versa. thank you very much, ludwig __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com