Re: date range to set of dates expansion - Mailing list pgsql-sql

From Gary Stainburn
Subject Re: date range to set of dates expansion
Date
Msg-id 201201191559.27698.gary.stainburn@ringways.co.uk
Whole thread Raw
In response to Re: date range to set of dates expansion  (Gary Stainburn <gary.stainburn@ringways.co.uk>)
Responses Re: SOLVED - date range to set of dates expansion
Re: date range to set of dates expansion
List pgsql-sql
The following code works in 8.4 but not 8.3.
Anyone know why, or what I need to do to change it?

SELECT aid, asid,      date_range (asdate, afdate)::date AS asdate,      acomments
FROM availability

In 8.4 it returns the expanded dataset as required. In 8.3 I get:

ERROR:  set-valued function called in context that cannot accept a set
CONTEXT:  PL/pgSQL function "date_range" line 4 at RETURN NEXT

Is there a way to use the integer only generate_series in 8.3 to generate 
dates by typecasting to/from integers?

-- 
Gary Stainburn
Group I.T. Manager
Ringways Garages
http://www.ringways.co.uk 


pgsql-sql by date:

Previous
From: Gary Stainburn
Date:
Subject: Re: date range to set of dates expansion
Next
From: Gary Stainburn
Date:
Subject: Re: SOLVED - date range to set of dates expansion