From 02927645976b52606601feb1b476612ceb3f1aef Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Fri, 9 Mar 2007 09:25:41 +1300 Subject: [PATCH] Change to work on PostgreSQL 7.4 and 8.0. --- dba/caldav_functions.sql | 2 +- .../regression-suite/900-Moz-REPORT.result | 82 +++++++++---------- .../901-GET-Collection.result | 20 ++--- 3 files changed, 52 insertions(+), 52 deletions(-) diff --git a/dba/caldav_functions.sql b/dba/caldav_functions.sql index 2dd3a5bd..2ccf2889 100644 --- a/dba/caldav_functions.sql +++ b/dba/caldav_functions.sql @@ -187,7 +187,6 @@ BEGIN -- I think this is not really right, since a WEEKLY on MO,WE,FR should -- occur three times each week and this will only be once a week. dow = substring( to_char( our_answer, ''DY'' ) for 2); - CONTINUE WHEN position( dow in byday ) = 0; ELSIF frequency = ''MONTHLY'' THEN IF byday IS NOT NULL THEN -- This works fine, except that maybe there are multiple BYDAY @@ -212,6 +211,7 @@ BEGIN -- Increment for our next time through the loop... our_answer := our_answer + (length::text || units)::interval; + END LOOP; RETURN our_answer; diff --git a/testing/tests/regression-suite/900-Moz-REPORT.result b/testing/tests/regression-suite/900-Moz-REPORT.result index d3c16a97..ce09d4a6 100644 --- a/testing/tests/regression-suite/900-Moz-REPORT.result +++ b/testing/tests/regression-suite/900-Moz-REPORT.result @@ -1,6 +1,6 @@ HTTP/1.1 207 Multi-Status Date: Dow, 01 Jan 2000 00:00:00 GMT -ETag: "22d2ec2ca3e08afc175c8adff74a499c" +ETag: "dc7586a942a88a75782c7e9217b57f44" Content-Length: 6643 Keep-Alive: timeout=15, max=100 Connection: Keep-Alive @@ -93,6 +93,46 @@ RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=1SU;BYMONTH=10 END:DAYLIGHT END:VTIMEZONE END:VCALENDAR + + + HTTP/1.1 200 OK + + + + http://mycaldav/caldav.php/user1/home/71e2ae82-7870-11db-c6d6-f6927c144649.ics + + + BEGIN:VCALENDAR +VERSION:2.0 +PRODID:-//PYVOBJECT//NONSGML Version 1//EN +BEGIN:VTIMEZONE +TZID:Pacific/Auckland +BEGIN:STANDARD +DTSTART:20000319T030000 +RRULE:FREQ=YEARLY;BYDAY=3SU;BYMONTH=3 +TZNAME:Pacific/Auckland +TZOFFSETFROM:+1300 +TZOFFSETTO:+1200 +END:STANDARD +BEGIN:DAYLIGHT +DTSTART:20001001T020000 +RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=10 +TZNAME:Pacific/Auckland +TZOFFSETFROM:+1200 +TZOFFSETTO:+1300 +END:DAYLIGHT +END:VTIMEZONE +BEGIN:VEVENT +UID:71e2ae82-7870-11db-c6d6-f6927c144649 +DTSTART;TZID=Pacific/Auckland:20061103T160000 +DTEND;TZID=Pacific/Auckland:20061103T174500 +DESCRIPTION: +LOCATION:Level 3 +RRULE:FREQ=WEEKLY;INTERVAL=2;UNTIL=20071222T235900 +STATUS:CONFIRMED +SUMMARY:Beer O'Clock +END:VEVENT +END:VCALENDAR HTTP/1.1 200 OK @@ -183,46 +223,6 @@ RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=1SU;BYMONTH=10 END:DAYLIGHT END:VTIMEZONE END:VCALENDAR - - - HTTP/1.1 200 OK - - - - http://mycaldav/caldav.php/user1/home/71e2ae82-7870-11db-c6d6-f6927c144649.ics - - - BEGIN:VCALENDAR -VERSION:2.0 -PRODID:-//PYVOBJECT//NONSGML Version 1//EN -BEGIN:VTIMEZONE -TZID:Pacific/Auckland -BEGIN:STANDARD -DTSTART:20000319T030000 -RRULE:FREQ=YEARLY;BYDAY=3SU;BYMONTH=3 -TZNAME:Pacific/Auckland -TZOFFSETFROM:+1300 -TZOFFSETTO:+1200 -END:STANDARD -BEGIN:DAYLIGHT -DTSTART:20001001T020000 -RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=10 -TZNAME:Pacific/Auckland -TZOFFSETFROM:+1200 -TZOFFSETTO:+1300 -END:DAYLIGHT -END:VTIMEZONE -BEGIN:VEVENT -UID:71e2ae82-7870-11db-c6d6-f6927c144649 -DTSTART;TZID=Pacific/Auckland:20061103T160000 -DTEND;TZID=Pacific/Auckland:20061103T174500 -DESCRIPTION: -LOCATION:Level 3 -RRULE:FREQ=WEEKLY;INTERVAL=2;UNTIL=20071222T235900 -STATUS:CONFIRMED -SUMMARY:Beer O'Clock -END:VEVENT -END:VCALENDAR HTTP/1.1 200 OK diff --git a/testing/tests/regression-suite/901-GET-Collection.result b/testing/tests/regression-suite/901-GET-Collection.result index 89e8a3a9..88a4474c 100644 --- a/testing/tests/regression-suite/901-GET-Collection.result +++ b/testing/tests/regression-suite/901-GET-Collection.result @@ -58,6 +58,16 @@ X-MOZ-LOCATIONPATH:9d050be7-8a02-4355-8ed3-02a9fc5f473f.ics LOCATION:In a confidential place END:VEVENT BEGIN:VEVENT +UID:71e2ae82-7870-11db-c6d6-f6927c144649 +DTSTART;TZID=Pacific/Auckland:20061103T160000 +DTEND;TZID=Pacific/Auckland:20061103T174500 +DESCRIPTION: +LOCATION:Level 3 +RRULE:FREQ=WEEKLY;INTERVAL=2;UNTIL=20071222T235900 +STATUS:CONFIRMED +SUMMARY:Beer O'Clock +END:VEVENT +BEGIN:VEVENT CREATED:20061223T031415Z LAST-MODIFIED:20061223T032305Z DTSTAMP:20061223T032305Z @@ -86,16 +96,6 @@ X-MOZ-LOCATIONPATH:fbd57454-d966-4a14-8341-abe1edb1ae66.ics LOCATION:Never never land END:VEVENT BEGIN:VEVENT -UID:71e2ae82-7870-11db-c6d6-f6927c144649 -DTSTART;TZID=Pacific/Auckland:20061103T160000 -DTEND;TZID=Pacific/Auckland:20061103T174500 -DESCRIPTION: -LOCATION:Level 3 -RRULE:FREQ=WEEKLY;INTERVAL=2;UNTIL=20071222T235900 -STATUS:CONFIRMED -SUMMARY:Beer O'Clock -END:VEVENT -BEGIN:VEVENT UID:da81c0ee-7871-11db-c6d6-f6927c144649 DTSTART:20061103T073000 DTEND:20061103T093000