X-Original-To: pgsql-sql@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id E57FC474E44 for ; Thu, 6 Feb 2003 07:15:45 -0500 (EST) Received: from innoviatech.com (mailgate.innoviatech.com [193.195.86.89]) by postgresql.org (Postfix) with ESMTP id B59B8474E42 for ; Thu, 6 Feb 2003 07:15:44 -0500 (EST) Received: from [10.0.0.18] ([10.0.0.18] verified) by innoviatech.com (CommuniGate Pro SMTP 4.0.1) with ESMTP id 326145; Thu, 06 Feb 2003 12:19:41 +0000 User-Agent: Microsoft-Entourage/10.1.1.2418 Date: Thu, 06 Feb 2003 12:17:31 +0000 Subject: Re: TIME vs. TIMESTAMP data type From: Julian Scarfe To: Ludwig Lim , PostgreSQL Mailing List Message-ID: In-Reply-To: <20030206110435.27538.qmail@web80303.mail.yahoo.com> Mime-version: 1.0 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200302/116 X-Sequence-Number: 11514 On 6/2/03 11:04, "Ludwig Lim" wrote: > Are there cases when a TIME data type is a better > choice over the TIMESTAMP data type? Surely this depends on the nature of the data that you want to represent? If you're researching into sleep patterns and want to represent the times each day that subjects say they tend to wake and/or fall asleep, you may want the TIME type, as the important aspect is the time, not the date. The inclusion of a date would be nonsensical. If you want to record *when* an event occurred, you usually want date and time, so TIMESTAMP is more appropriate. Since event timing is a much more frequent requirement than a time-of-day, it's not surprising that the facilities may be better developed for dealing with that type. Julian Scarfe