forked from volkanunsal/postgres-rrule
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0205894
commit 2140091
Showing
2 changed files
with
8 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
CREATE OR REPLACE FUNCTION _rrule.contains_timestamp(_rrule.rruleset, TIMESTAMP) | ||
CREATE OR REPLACE FUNCTION _rrule.contains_timestamp(_rrule.RRULESET, TIMESTAMP) | ||
RETURNS BOOLEAN AS $$ | ||
DECLARE | ||
isEmpty boolean; | ||
inSet boolean; | ||
BEGIN | ||
SELECT COUNT(*) > 0 | ||
INTO isEmpty | ||
INTO inSet | ||
FROM _rrule.after($1, $2 - INTERVAL '1 month') "ts" | ||
WHERE "ts"::date = $2::date; | ||
|
||
RETURN isEmpty; | ||
RETURN inSet; | ||
END; | ||
$$ LANGUAGE plpgsql IMMUTABLE STRICT; |