Solved - best way: diary functions. - Mailing list pgsql-sql

From Gary Stainburn
Subject Solved - best way: diary functions.
Date
Msg-id 200704041427.09056.gary.stainburn@ringways.co.uk
Whole thread Raw
In response to best way: diary functions.  (Gary Stainburn <gary.stainburn@ringways.co.uk>)
List pgsql-sql
My solution that works is:

select date_range as rdate,  case      when rsgsid is not null then 2     when aid is not null then 1     else 0 end as
statusfrom date_range('2007-04-01','2007-04-30') left join availability a on a.asid = 1 and (date_range,date_range)
overlaps
 
(a.asdate,a.afdate) left join roster_staff r on r.rsdate = date_range;

Can anyone see any problems or improvements to this?
-- 
Gary Stainburn
This email does not contain private or confidential material as it
may be snooped on by interested government parties for unknown
and undisclosed purposes - Regulation of Investigatory Powers Act, 2000     


pgsql-sql by date:

Previous
From: Richard Broersma Jr
Date:
Subject: Re: Moving a simple function to pl/pgsql (Novice question)
Next
From: Peter Eisentraut
Date:
Subject: Re: CPU statistics