pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Data Types
2+ messages / 2 participants
[nested] [flat]

* Data Types
@ 2001-02-16 18:45 David Olbersen <dave@slickness.org>
  2001-02-16 19:22 ` Re: Data Types Josh Berkus <josh@agliodbs.com>
  0 siblings, 1 reply; 2+ messages in thread

From: David Olbersen @ 2001-02-16 18:45 UTC (permalink / raw)
  To: pgsql-sql

Hello.

I have a table in which I'm trying to store the length of a sound file. I
decided to use the TIME data type. Was this correct? One of the operations I
want to do is sum() all of my files lengths to get the total amount in terms of
time, of sound that I have.

I notice that sum() doesn't take a TIME argument, so I cast it to an interval
as such:
  SELECT SUM( length::interval ) FROM songs;

However this gives me output that I don't know how to read: '7 02:34:27'
Does that read as 7 Days, 2 Hours, 34 Minutes and 27 seconds?

TIA

-- Dave




^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Data Types
  2001-02-16 18:45 Data Types David Olbersen <dave@slickness.org>
@ 2001-02-16 19:22 ` Josh Berkus <josh@agliodbs.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Josh Berkus @ 2001-02-16 19:22 UTC (permalink / raw)
  To: pgsql-sql


David,

> However this gives me output that I don't know how to read: '7 02:34:27'
> Does that read as 7 Days, 2 Hours, 34 Minutes and 27 seconds?

Yes.

-Josh Berkus

-- 
______AGLIO DATABASE SOLUTIONS___________________________
                                        Josh Berkus
   Complete information technology      josh@agliodbs.com
    and data management solutions       (415) 565-7293
   for law firms, small businesses       fax  621-2533
    and non-profit organizations.       San Francisco



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2001-02-16 19:22 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-02-16 18:45 Data Types David Olbersen <dave@slickness.org>
2001-02-16 19:22 ` Josh Berkus <josh@agliodbs.com>

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