View | Details | Raw Unified | Return to bug 239652
Collapse All | Expand All

(-)databases/skytools/Makefile (+3 lines)
Lines 10-15 Link Here
10
MAINTAINER=	sam@cassiba.com
10
MAINTAINER=	sam@cassiba.com
11
COMMENT=	PostgreSQL tools from Skype: walshipping, queueing, replication
11
COMMENT=	PostgreSQL tools from Skype: walshipping, queueing, replication
12
12
13
DEPRECATED=	Abandonware
14
EXPIRATION_DATE=	2019-09-15
15
13
GNU_CONFIGURE=	yes
16
GNU_CONFIGURE=	yes
14
USES=		gmake python:2.7 shebangfix pgsql
17
USES=		gmake python:2.7 shebangfix pgsql
15
LLD_UNSAFE=	yes
18
LLD_UNSAFE=	yes
(-)databases/skytools/files/patch-sql_pgq_triggers_common.c (+62 lines)
Line 0 Link Here
1
--- sql/pgq/triggers/common.c.orig	2019-08-05 04:40:08 UTC
2
+++ sql/pgq/triggers/common.c
3
@@ -125,9 +125,15 @@ static void fill_magic_columns(PgqTriggerEvent *ev)
4
 
5
 	for (i = 0; i < tupdesc->natts; i++) {
6
 		/* Skip dropped columns */
7
+#if PG_VERSION_NUM < 110000
8
 		if (tupdesc->attrs[i]->attisdropped)
9
 			continue;
10
 		col_name = NameStr(tupdesc->attrs[i]->attname);
11
+#else
12
+		if (TupleDescAttr(tupdesc, i)->attisdropped)
13
+			continue;
14
+		col_name = NameStr(TupleDescAttr(tupdesc, i)->attname);
15
+#endif
16
 		if (!is_magic_field(col_name))
17
 			continue;
18
 		if (strcmp(col_name, "_pgq_ev_type") == 0)
19
@@ -481,7 +487,11 @@ static void parse_oldstyle_args(PgqTriggerEvent *ev, T
20
 	 */
21
 	tupdesc = tg->tg_relation->rd_att;
22
 	for (i = 0, attcnt = 0; i < tupdesc->natts; i++) {
23
+#if PG_VERSION_NUM < 110000
24
 		if (!tupdesc->attrs[i]->attisdropped)
25
+#else
26
+		if (!TupleDescAttr(tupdesc, i)->attisdropped)
27
+#endif
28
 			attcnt++;
29
 	}
30
 
31
@@ -598,9 +608,15 @@ bool pgqtriga_skip_col(PgqTriggerEvent *ev, int i, int
32
 	const char *name;
33
 
34
 	tupdesc = tg->tg_relation->rd_att;
35
+#if PG_VERSION_NUM < 110000
36
 	if (tupdesc->attrs[i]->attisdropped)
37
 		return true;
38
 	name = NameStr(tupdesc->attrs[i]->attname);
39
+#else
40
+	if (TupleDescAttr(tupdesc, i)->attisdropped)
41
+		return true;
42
+	name = NameStr(TupleDescAttr(tupdesc, i)->attname);
43
+#endif
44
 
45
 	if (is_magic_field(name)) {
46
 		ev->tgargs->custom_fields = 1;
47
@@ -632,9 +648,15 @@ bool pgqtriga_is_pkey(PgqTriggerEvent *ev, int i, int 
48
 		return ev->attkind[attkind_idx] == 'k';
49
 	} else if (ev->pkey_list) {
50
 		tupdesc = tg->tg_relation->rd_att;
51
+#if PG_VERSION_NUM < 110000
52
 		if (tupdesc->attrs[i]->attisdropped)
53
 			return false;
54
 		name = NameStr(tupdesc->attrs[i]->attname);
55
+#else
56
+		if (TupleDescAttr(tupdesc, i)->attisdropped)
57
+			return false;
58
+		name = NameStr(TupleDescAttr(tupdesc, i)->attname);
59
+#endif
60
 		if (is_magic_field(name)) {
61
 			ev->tgargs->custom_fields = 1;
62
 			return false;
(-)databases/skytools/files/patch-sql_pgq_triggers_logutriga.c (+26 lines)
Line 0 Link Here
1
--- sql/pgq/triggers/logutriga.c.orig	2019-08-05 04:38:03 UTC
2
+++ sql/pgq/triggers/logutriga.c
3
@@ -54,7 +54,11 @@ static int is_interesting_change(PgqTriggerEvent *ev, 
4
 		/*
5
 		 * Ignore dropped columns
6
 		 */
7
+#if PG_VERSION_NUM < 110000
8
 		if (tupdesc->attrs[i]->attisdropped)
9
+#else
10
+		if (TupleDescAttr(tupdesc, i)->attisdropped)
11
+#endif
12
 			continue;
13
 		attkind_idx++;
14
 
15
@@ -145,7 +149,11 @@ void pgq_urlenc_row(PgqTriggerEvent *ev, HeapTuple row
16
 
17
 	for (i = 0; i < tg->tg_relation->rd_att->natts; i++) {
18
 		/* Skip dropped columns */
19
+#if PG_VERSION_NUM < 110000
20
 		if (tupdesc->attrs[i]->attisdropped)
21
+#else
22
+		if (TupleDescAttr(tupdesc, i)->attisdropped)
23
+#endif
24
 			continue;
25
 
26
 		attkind_idx++;
(-)databases/skytools/files/patch-sql_pgq_triggers_makesql.c (+86 lines)
Line 0 Link Here
1
--- sql/pgq/triggers/makesql.c.orig	2019-08-05 04:44:33 UTC
2
+++ sql/pgq/triggers/makesql.c
3
@@ -71,7 +71,11 @@ static void process_insert(PgqTriggerEvent *ev, String
4
 		char *col_ident;
5
 
6
 		/* Skip dropped columns */
7
+#if PG_VERSION_NUM < 110000
8
 		if (tupdesc->attrs[i]->attisdropped)
9
+#else
10
+		if (TupleDescAttr(tupdesc, i)->attisdropped)
11
+#endif
12
 			continue;
13
 
14
 		/* Check if allowed by colstring */
15
@@ -103,7 +107,11 @@ static void process_insert(PgqTriggerEvent *ev, String
16
 		char *col_value;
17
 
18
 		/* Skip dropped columns */
19
+#if PG_VERSION_NUM < 110000
20
 		if (tupdesc->attrs[i]->attisdropped)
21
+#else
22
+		if (TupleDescAttr(tupdesc, i)->attisdropped)
23
+#endif
24
 			continue;
25
 
26
 		/* Check if allowed by colstring */
27
@@ -154,7 +162,11 @@ static int process_update(PgqTriggerEvent *ev, StringI
28
 		/*
29
 		 * Ignore dropped columns
30
 		 */
31
+#if PG_VERSION_NUM < 110000
32
 		if (tupdesc->attrs[i]->attisdropped)
33
+#else
34
+		if (TupleDescAttr(tupdesc, i)->attisdropped)
35
+#endif
36
 			continue;
37
 
38
 		attkind_idx++;
39
@@ -240,7 +252,11 @@ static int process_update(PgqTriggerEvent *ev, StringI
40
 			return 0;
41
 
42
 		for (i = 0, attkind_idx = -1; i < tupdesc->natts; i++) {
43
+#if PG_VERSION_NUM < 110000
44
 			if (tupdesc->attrs[i]->attisdropped)
45
+#else
46
+			if (TupleDescAttr(tupdesc, i)->attisdropped)
47
+#endif
48
 				continue;
49
 
50
 			attkind_idx++;
51
@@ -259,7 +275,11 @@ static int process_update(PgqTriggerEvent *ev, StringI
52
 		/*
53
 		 * Ignore dropped columns
54
 		 */
55
+#if PG_VERSION_NUM < 110000
56
 		if (tupdesc->attrs[i]->attisdropped)
57
+#else
58
+		if (TupleDescAttr(tupdesc, i)->attisdropped)
59
+#endif
60
 			continue;
61
 
62
 		attkind_idx++;
63
@@ -291,7 +311,11 @@ static void process_delete(PgqTriggerEvent *ev, String
64
 	int attkind_idx;
65
 
66
 	for (i = 0, attkind_idx = -1; i < tupdesc->natts; i++) {
67
+#if PG_VERSION_NUM < 110000
68
 		if (tupdesc->attrs[i]->attisdropped)
69
+#else
70
+		if (TupleDescAttr(tupdesc, i)->attisdropped)
71
+#endif
72
 			continue;
73
 
74
 		attkind_idx++;
75
@@ -323,7 +347,11 @@ int pgqtriga_make_sql(PgqTriggerEvent *ev, StringInfo 
76
 	 * Count number of active columns
77
 	 */
78
 	for (i = 0, attcnt = 0; i < tupdesc->natts; i++) {
79
+#if PG_VERSION_NUM < 110000
80
 		if (tupdesc->attrs[i]->attisdropped)
81
+#else
82
+		if (TupleDescAttr(tupdesc, i)->attisdropped)
83
+#endif
84
 			continue;
85
 		attcnt++;
86
 	}
(-)databases/skytools/files/patch-sql_pgq_triggers_stringutil.c (+14 lines)
Line 0 Link Here
1
--- sql/pgq/triggers/stringutil.c.orig	2019-08-05 04:48:30 UTC
2
+++ sql/pgq/triggers/stringutil.c
3
@@ -19,7 +19,11 @@
4
 #include <postgres.h>
5
 #include <lib/stringinfo.h>
6
 #include <mb/pg_wchar.h>
7
+#if PG_VERSION_NUM < 110000
8
 #include <parser/keywords.h>
9
+#else
10
+#include <common/keywords.h>
11
+#endif
12
 #include <utils/memutils.h>
13
 
14
 #include "stringutil.h"
(-)databases/skytools/files/patch-sql_txid_Makefile (+11 lines)
Line 0 Link Here
1
--- sql/txid/Makefile.orig	2013-07-29 08:14:55 UTC
2
+++ sql/txid/Makefile
3
@@ -12,7 +12,7 @@ pg83 = $(shell test $(PGVER) "<" "8.3" && echo "false"
4
 pg82 = $(shell test $(PGVER) "<" "8.2" && echo "false" || echo "true")
5
 endif
6
 
7
-ifeq ($(pg83),true)  # we have 8.3 with internal txid
8
+ifeq (1,1) # we always have >= 9.4 with internal txid
9
 
10
 # install empty txid.sql
11
 DATA_built = txid.sql

Return to bug 239652