Unix Technical Forum

merge timestamps to intervals

This is a discussion on merge timestamps to intervals within the pgsql Sql forums, part of the PostgreSQL category; --> Hi! I have a table where I repeatingly log the status of some service, which looks something like this: ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Sql

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 05-11-2008, 08:42 PM
Patrick Scharrenberg
 
Posts: n/a
Default merge timestamps to intervals

Hi!

I have a table where I repeatingly log the status of some service, which
looks something like this:

< timestamp, status >

Now, everytime my service is up I save the timestamp and a status of
"up", if it's down I save the timestamp with "down", eg:
10:13 up
10:14 up
10:15 up
10:16 down
10:17 up
10:18 up

I'd like to merge this information to intervals where the service was up
or down.

< intervall, status >
10:13-10:15 up
10:16-10:16 down
10:17-1018 up

I've no clue how to approach this problem.

Any ideas/hints?

Thanks
Patrick
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 01:56 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com