time series data

From: azwa(at)nc(dot)com(dot)my
To: pgsql-sql(at)postgresql(dot)org
Subject: time series data
Date: 2004-01-21 08:53:11
Message-ID: OF79EF187C.A5E0B2D9-ONFFFFFF50.004B0C31@nc.com.my
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hi,

i want to create time table & the structure as below :


Column
Type
Modifiers
time_key
yr_id
month_id
month_desc
day_id
integer
integer
integer
text
integer
not null default nextval('time_seq'::text)

Example of data in time table:

Time_key
yr_id
month_id
month_desc
day_id

1999
1
Jan
1

1999
1
Jan
2

2000
1
Jan
1

time_key data will keep increment reading from sequence. i'm going to have
a data from yr_id =1994 --> 2009 , month_id =1 -->12
and day_id =1 -->31 for each month. So is there any solution (using
function, or else) that can give me the above data
in Postgresql??.

thanks in advance.

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Tomasz Myrta 2004-01-21 09:37:11 Re: time series data
Previous Message Terence Kearns 2004-01-21 08:09:20 cygwin warnings in the log file