pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Julian Scarfe <julian.scarfe@ntlworld.com>
Cc: Oliver Vecernik <vecernik@aon.at>
Cc: pgsql-sql@postgresql.org
Subject: Re: sum(time) problem
Date: Fri, 17 Jan 2003 10:03:04 -0500
Message-ID: <11792.1042815784@sss.pgh.pa.us> (raw)
In-Reply-To: <BA4DB1FB.204D0%julian.scarfe@ntlworld.com>
References: <BA4DB1FB.204D0%julian.scarfe@ntlworld.com>

Julian Scarfe <julian.scarfe@ntlworld.com> writes:
>> It seems I've chosen the wrong type. Or is there another solution?

> Correct diagnosis.  You need the "interval" type, not the "time" type for
> your second field.  Interval is a time difference between two timestamps,
> for example the time between the start and the finish of a race.

Right.  "time" is intended for time-of-day values; so taking the sum
would be a nonsensical operation.

			regards, tom lane



view thread (6+ messages)  latest in thread

Message-ID: <11792.1042815784@sss.pgh.pa.us>
Permalink:  ../11792.1042815784@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/11792.1042815784@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, julian.scarfe@ntlworld.com, vecernik@aon.at
  Subject: Re: sum(time) problem
  In-Reply-To: <11792.1042815784@sss.pgh.pa.us>

* 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