View | Details | Raw Unified | Return to bug 223684 | Differences between
and this patch

Collapse All | Expand All

(-)www/davical/Makefile (-3 / +2 lines)
Lines 3-10 Link Here
3
3
4
PORTNAME=	davical
4
PORTNAME=	davical
5
DISTVERSIONPREFIX=	r
5
DISTVERSIONPREFIX=	r
6
DISTVERSION=	1.1.5
6
DISTVERSION=	1.1.6
7
PORTREVISION=	2
8
CATEGORIES?=	www
7
CATEGORIES?=	www
9
MASTER_SITES=	https://gitlab.com/${PORTNAME}-project/${PORTNAME}/repository/archive.tar.gz?ref=${DISTVERSIONPREFIX}${PORTVERSION}&dummy=/
8
MASTER_SITES=	https://gitlab.com/${PORTNAME}-project/${PORTNAME}/repository/archive.tar.gz?ref=${DISTVERSIONPREFIX}${PORTVERSION}&dummy=/
10
9
Lines 21-27 Link Here
21
		${LOCALBASE}/bin/pwgen:sysutils/pwgen \
20
		${LOCALBASE}/bin/pwgen:sysutils/pwgen \
22
		php-libawl>=0.54:devel/php-libawl
21
		php-libawl>=0.54:devel/php-libawl
23
22
24
WRKSRC=		${WRKDIR}/${PORTNAME}-${DISTVERSIONPREFIX}${PORTVERSION}-7ccc7c449176475891ec50d5524928628df6f8d1
23
WRKSRC=		${WRKDIR}/${PORTNAME}-${DISTVERSIONPREFIX}${PORTVERSION}-3ba605288fb0fc0a4f2abce09874f8dab5ffdfb8
25
24
26
NO_BUILD=	yes
25
NO_BUILD=	yes
27
USES=		pgsql php shebangfix
26
USES=		pgsql php shebangfix
(-)www/davical/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1485803035
1
TIMESTAMP = 1510759997
2
SHA256 (davical-r1.1.5.tar.gz) = 3b4e1e3007eb0261cdd23544a5516bb46085cdfa2954ab4a35443d762eedd19c
2
SHA256 (davical-r1.1.6.tar.gz) = 54785cbcb804fac60061cbe5f419b0cf6ef3885286ea5b968d6ce8292d7a332f
3
SIZE (davical-r1.1.5.tar.gz) = 1781265
3
SIZE (davical-r1.1.6.tar.gz) = 1784517
(-)www/davical/files/patch-git_39001794 (-59 lines)
Lines 1-59 Link Here
1
From 39001794a3121c33c8cba50398b653a94328be40 Mon Sep 17 00:00:00 2001
2
From: Florian Schlichting <fsfs@debian.org>
3
Date: Tue, 3 Oct 2017 22:36:29 +0200
4
Subject: [PATCH] Update caldav_functions.sql for Postgresql 10
5
6
From version 10, Postgresql does not allow set-returning functions in
7
CASE statements. As we're using the functions recursively, we cannot
8
use LATERAL as suggested in the error message, but we can switch the
9
condition inside-out with only a limited amount of repetition.
10
11
--- dba/caldav_functions.sql
12
+++ dba/caldav_functions.sql
13
@@ -897,21 +897,37 @@ LANGUAGE plpgsql IMMUTABLE STRICT;
14
 
15
 -- Expanded group memberships out to some depth
16
 CREATE or REPLACE FUNCTION expand_memberships( INT8, INT ) RETURNS SETOF INT8 AS $$
17
-  SELECT group_id FROM group_member WHERE member_id = $1
18
-      UNION
19
-  SELECT expanded.g_id FROM (SELECT CASE WHEN $2 > 0 THEN expand_memberships( group_id, $2 - 1) END AS g_id
20
-                               FROM group_member WHERE member_id = $1) AS expanded
21
-                       WHERE expanded.g_id IS NOT NULL;
22
-$$ LANGUAGE sql STABLE STRICT;
23
+BEGIN
24
+  IF $2 > 0 THEN
25
+    RETURN QUERY
26
+      SELECT group_id FROM group_member WHERE member_id = $1
27
+        UNION
28
+      SELECT expanded.g_id FROM (SELECT expand_memberships( group_id, $2 - 1) AS g_id
29
+                                 FROM group_member WHERE member_id = $1) AS expanded
30
+                            WHERE expanded.g_id IS NOT NULL;
31
+  ELSE
32
+    RETURN QUERY
33
+      SELECT group_id FROM group_member WHERE member_id = $1;
34
+  END IF;
35
+END
36
+$$ LANGUAGE plpgsql IMMUTABLE STRICT;
37
 
38
 -- Expanded group members out to some depth
39
 CREATE or REPLACE FUNCTION expand_members( INT8, INT ) RETURNS SETOF INT8 AS $$
40
-  SELECT member_id FROM group_member WHERE group_id = $1
41
-      UNION
42
-  SELECT expanded.m_id FROM (SELECT CASE WHEN $2 > 0 THEN expand_members( member_id, $2 - 1) END AS m_id
43
-                               FROM group_member WHERE group_id = $1) AS expanded
44
-                       WHERE expanded.m_id IS NOT NULL;
45
-$$ LANGUAGE sql STABLE STRICT;
46
+BEGIN
47
+  IF $2 > 0 THEN
48
+    RETURN QUERY
49
+      SELECT member_id FROM group_member WHERE group_id = $1
50
+        UNION
51
+      SELECT expanded.m_id FROM (SELECT expand_members( member_id, $2 - 1) AS m_id
52
+                                 FROM group_member WHERE group_id = $1) AS expanded
53
+                            WHERE expanded.m_id IS NOT NULL;
54
+  ELSE
55
+    RETURN QUERY
56
+      SELECT member_id FROM group_member WHERE group_id = $1;
57
+  END IF;
58
+END
59
+$$ LANGUAGE plpgsql IMMUTABLE STRICT;

Return to bug 223684