Index: openacs-4/packages/calendar/www/views-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/www/Attic/views-postgresql.xql,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/calendar/www/views-postgresql.xql 15 Feb 2004 12:16:25 -0000 1.2
+++ openacs-4/packages/calendar/www/views-postgresql.xql 19 Feb 2004 17:58:37 -0000 1.3
@@ -4,55 +4,71 @@
postgresql7.1
-
-select to_char(start_date, 'YYYY-MM-DD HH24:MI:SS') as ansi_start_date,
- to_char(end_date, 'YYYY-MM-DD HH24:MI:SS') as ansi_end_date,
- coalesce(e.name, a.name) as name,
- coalesce(e.status_summary, a.status_summary) as status_summary,
- e.event_id as item_id,
- (select type from cal_item_types where item_type_id= ci.item_type_id) as item_type,
- cals.calendar_id,
- cals.calendar_name
-$additional_select_clause
-from acs_activities a,
- acs_events e,
- timespans s,
- time_intervals t,
- cal_items ci,
- calendars cals
-where e.timespan_id = s.timespan_id
-and s.interval_id = t.interval_id
-and e.activity_id = a.activity_id
-and start_date between $interval_limitation_clause
-and ci.cal_item_id= e.event_id
-and cals.calendar_id = ci.on_which_calendar
-and e.event_id = ci.cal_item_id
-$additional_limitations_clause
-$calendars_clause
-$order_by_clause
-
+
+ select to_char(start_date, 'YYYY-MM-DD HH24:MI:SS') as ansi_start_date,
+ to_char(end_date, 'YYYY-MM-DD HH24:MI:SS') as ansi_end_date,
+ coalesce(e.name, a.name) as name,
+ coalesce(e.status_summary, a.status_summary) as status_summary,
+ e.event_id as item_id,
+ (select type from cal_item_types where item_type_id= ci.item_type_id) as item_type,
+ cals.calendar_id,
+ cals.calendar_name
+ $additional_select_clause
+ from acs_activities a,
+ acs_events e,
+ timespans s,
+ time_intervals t,
+ cal_items ci,
+ calendars cals
+ where e.timespan_id = s.timespan_id
+ and s.interval_id = t.interval_id
+ and e.activity_id = a.activity_id
+ and start_date between $interval_limitation_clause
+ and ci.cal_item_id= e.event_id
+ and cals.calendar_id = ci.on_which_calendar
+ and e.event_id = ci.cal_item_id
+ $additional_limitations_clause
+ $calendars_clause
+ $order_by_clause
+
+
-
- select to_char(to_date(:current_date, 'yyyy-mm-dd'),
- 'Day, DD Month YYYY') as day_of_the_week,
- to_char(to_date(:current_date, 'yyyy-mm-dd') -
- cast('1 day' as interval), 'yyyy-mm-dd') as yesterday,
- to_char(to_date(:current_date, 'yyyy-mm-dd') +
- cast('1 day' as interval), 'yyyy-mm-dd')
- as tomorrow
-from dual
-
+
+ select to_char(to_date(:current_date, 'yyyy-mm-dd'), 'Day, DD Month YYYY') as day_of_the_week,
+ to_char(to_date(:current_date, 'yyyy-mm-dd') - cast('1 day' as interval), 'yyyy-mm-dd') as yesterday,
+ to_char(to_date(:current_date, 'yyyy-mm-dd') + cast('1 day' as interval), 'yyyy-mm-dd') as tomorrow
+ from dual
+
-
+
to_timestamp(:first_date_of_month_system,'YYYY-MM-DD HH24:MI:SS')
and to_timestamp(:last_date_in_month_system, 'YYYY-MM-DD HH24:MI:SS')
-
+
+
+
+ to_date(:current_date,'YYYY-MM-DD')
+ and to_date(:current_date,'YYYY-MM-DD') + cast('23 hours 59 minutes 59 seconds' as interval)
+
+
+
+
+ to_date(:first_weekday_of_the_week_tz, 'YYYY-MM-DD HH24:MI:SS') and to_date(:last_weekday_of_the_week_tz, 'YYYY-MM-DD HH24:MI:SS')
+
+
+
+
+ to_timestamp(:start_date,'YYYY-MM-DD HH24:MI:SS') and to_timestamp(:end_date, 'YYYY-MM-DD HH24:MI:SS')
+
+
+
+
+