summaryrefslogtreecommitdiff
path: root/util/updates
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2009-03-07 15:11:58 +0100
committerYorhel <git@yorhel.nl>2009-03-07 15:11:58 +0100
commita9749950a04175cfed998ba9f98fb89a3de1544c (patch)
tree74771e4857a7156d7ea217ffef2210cab78d7c7f /util/updates
parentafd4fa3f408e5644c207e7c4d15f41ff4889904b (diff)
Hiding spoilers on tag pages
Diffstat (limited to 'util/updates')
-rw-r--r--util/updates/update_2.3.sql2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/updates/update_2.3.sql b/util/updates/update_2.3.sql
index 533a6581..02a32106 100644
--- a/util/updates/update_2.3.sql
+++ b/util/updates/update_2.3.sql
@@ -141,7 +141,7 @@ CREATE OR REPLACE VIEW tags_vn_bayesian AS
SELECT tag, vid, users,
( (SELECT AVG(users)::real * AVG(rating)::real FROM tags_vn_inherited WHERE tag = tvi.tag) + users*rating )
/ ( (SELECT AVG(users)::real FROM tags_vn_inherited WHERE tag = tvi.tag) + users )::real AS rating,
- spoiler -- <- some kind of bayesian average for the spoiler status? or is AVG() good enough?
+ (CASE WHEN spoiler < 0.7 THEN 0 WHEN spoiler > 1.3 THEN 2 ELSE 1 END)::smallint AS spoiler
FROM tags_vn_inherited tvi;