pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Julian Scarfe <julian.scarfe@ntlworld.com>
To: Ludwig Lim <lud_nowhere_man@yahoo.com>
To: PostgreSQL Mailing List <pgsql-sql@postgresql.org>
Subject: Re: TIME vs. TIMESTAMP data type
Date: Thu, 06 Feb 2003 12:17:31 +0000
Message-ID: <BA6802DB.216F5%julian.scarfe@ntlworld.com> (raw)
In-Reply-To: <20030206110435.27538.qmail@web80303.mail.yahoo.com>

On 6/2/03 11:04, "Ludwig Lim" <lud_nowhere_man@yahoo.com> 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




view thread (4+ messages)

Message-ID: <BA6802DB.216F5%julian.scarfe@ntlworld.com>
Permalink:  ../BA6802DB.216F5%25julian.scarfe@ntlworld.com/
Also on:    postgresql.org/message-id/BA6802DB.216F5%julian.scarfe@ntlworld.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: julian.scarfe@ntlworld.com, lud_nowhere_man@yahoo.com
  Subject: Re: TIME vs. TIMESTAMP data type
  In-Reply-To: <BA6802DB.216F5%julian.scarfe@ntlworld.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox