Temporal'sh type sql question

From: Angus Miller <all4miller(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Temporal'sh type sql question
Date: 2010-09-06 12:18:52
Message-ID: AANLkTimkzt32KhUUVYgeRNc5RYUzcOknMxrj1KYXH+mZ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi

I have a table that models data in a temporal fashion. I say temporal
fashion as I'm not sure I got this 100% right buy here goes. Basically
each record has a date_from and date_to column. The date_from column
always defaults to the current system date. The date_to column is
either a far future value or the date that that records life-cycle
ended.

For simplicities sake lets say I'm recording some configuration data
that is relatively static. Now there is a need to report on the
changes per day. The temporal data is only storing new events when
they happen, maybe one every 10-15 days.

How can I generate result-set that will carry the previous records
values through till a new event occurred so there is a record for each
"day"?

Cheers
Angus

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Sergey Konoplev 2010-09-06 12:29:02 Re: Temporal'sh type sql question
Previous Message Craig Ringer 2010-09-06 09:28:24 Re: FC13 RPMs for 9.0 - on postgresql.org ftp, but not in yum repo?