Skip to content

Commit

Permalink
sql: fix DELETE TRIGGER RETURN values
Browse files Browse the repository at this point in the history
  • Loading branch information
astro committed May 21, 2012
1 parent 4829afe commit 6c1e75f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pg_downloads.sql
Expand Up @@ -126,6 +126,7 @@ CREATE OR REPLACE FUNCTION update_downloads_cache_on_delete_enclosure_torrents(
BEGIN
DELETE FROM downloads_cache
WHERE "enclosure"=OLD."url";
RETURN OLD;
END;
$$ LANGUAGE plpgsql;

Expand Down Expand Up @@ -208,6 +209,7 @@ CREATE OR REPLACE FUNCTION update_downloads_cache_on_delete_user_feeds(
BEGIN
DELETE FROM downloads_cache
WHERE "user"=OLD."user" AND "slug"=OLD."slug";
RETURN OLD;
END;
$$ LANGUAGE plpgsql;

Expand Down Expand Up @@ -242,6 +244,7 @@ CREATE OR REPLACE FUNCTION update_downloads_cache_on_delete_enclosures(
BEGIN
DELETE FROM downloads_cache
WHERE "feed"=OLD."feed" AND "item"=OLD."item" AND "enclosure"=OLD."url";
RETURN OLD;
END;
$$ LANGUAGE plpgsql;

Expand Down

0 comments on commit 6c1e75f

Please sign in to comment.