databases/skytools: Unbreak build with PostgreSQL 11
logutriga.c:57:24: error: member reference type 'FormData_pg_attribute' (aka 'struct FormData_pg_attribute') is not a pointer; did you mean to use '.'? if (tupdesc->attrs[i]->attisdropped) ~~~~~~~~~~~~~~~~~^~ . logutriga.c:148:24: error: member reference type 'FormData_pg_attribute' (aka 'struct FormData_pg_attribute') is not a pointer; did you mean to use '.'? if (tupdesc->attrs[i]->attisdropped) ~~~~~~~~~~~~~~~~~^~ . 2 errors generated. http://package18.nyi.freebsd.org/data/120amd64-default-PR239514/2019-07-29_20h41m52s/logs/skytools-3.2_3.log While here deprecate it. It was last updated in 2014 and seems to have been abandoned. PR: 239652 Approved by: sam@cassiba.com (maintainer timeout, 2 weeks)
This commit is contained in:
parent
ebfce89036
commit
c2786db5c8
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=509208
@ -10,6 +10,9 @@ MASTER_SITES= http://pgfoundry.org/frs/download.php/3622/
|
||||
MAINTAINER= sam@cassiba.com
|
||||
COMMENT= PostgreSQL tools from Skype: walshipping, queueing, replication
|
||||
|
||||
DEPRECATED= Abandonware
|
||||
EXPIRATION_DATE= 2019-09-15
|
||||
|
||||
GNU_CONFIGURE= yes
|
||||
USES= gmake python:2.7 shebangfix pgsql
|
||||
LLD_UNSAFE= yes
|
||||
|
62
databases/skytools/files/patch-sql_pgq_triggers_common.c
Normal file
62
databases/skytools/files/patch-sql_pgq_triggers_common.c
Normal file
@ -0,0 +1,62 @@
|
||||
--- sql/pgq/triggers/common.c.orig 2019-08-05 04:40:08 UTC
|
||||
+++ sql/pgq/triggers/common.c
|
||||
@@ -125,9 +125,15 @@ static void fill_magic_columns(PgqTriggerEvent *ev)
|
||||
|
||||
for (i = 0; i < tupdesc->natts; i++) {
|
||||
/* Skip dropped columns */
|
||||
+#if PG_VERSION_NUM < 110000
|
||||
if (tupdesc->attrs[i]->attisdropped)
|
||||
continue;
|
||||
col_name = NameStr(tupdesc->attrs[i]->attname);
|
||||
+#else
|
||||
+ if (TupleDescAttr(tupdesc, i)->attisdropped)
|
||||
+ continue;
|
||||
+ col_name = NameStr(TupleDescAttr(tupdesc, i)->attname);
|
||||
+#endif
|
||||
if (!is_magic_field(col_name))
|
||||
continue;
|
||||
if (strcmp(col_name, "_pgq_ev_type") == 0)
|
||||
@@ -481,7 +487,11 @@ static void parse_oldstyle_args(PgqTriggerEvent *ev, T
|
||||
*/
|
||||
tupdesc = tg->tg_relation->rd_att;
|
||||
for (i = 0, attcnt = 0; i < tupdesc->natts; i++) {
|
||||
+#if PG_VERSION_NUM < 110000
|
||||
if (!tupdesc->attrs[i]->attisdropped)
|
||||
+#else
|
||||
+ if (!TupleDescAttr(tupdesc, i)->attisdropped)
|
||||
+#endif
|
||||
attcnt++;
|
||||
}
|
||||
|
||||
@@ -598,9 +608,15 @@ bool pgqtriga_skip_col(PgqTriggerEvent *ev, int i, int
|
||||
const char *name;
|
||||
|
||||
tupdesc = tg->tg_relation->rd_att;
|
||||
+#if PG_VERSION_NUM < 110000
|
||||
if (tupdesc->attrs[i]->attisdropped)
|
||||
return true;
|
||||
name = NameStr(tupdesc->attrs[i]->attname);
|
||||
+#else
|
||||
+ if (TupleDescAttr(tupdesc, i)->attisdropped)
|
||||
+ return true;
|
||||
+ name = NameStr(TupleDescAttr(tupdesc, i)->attname);
|
||||
+#endif
|
||||
|
||||
if (is_magic_field(name)) {
|
||||
ev->tgargs->custom_fields = 1;
|
||||
@@ -632,9 +648,15 @@ bool pgqtriga_is_pkey(PgqTriggerEvent *ev, int i, int
|
||||
return ev->attkind[attkind_idx] == 'k';
|
||||
} else if (ev->pkey_list) {
|
||||
tupdesc = tg->tg_relation->rd_att;
|
||||
+#if PG_VERSION_NUM < 110000
|
||||
if (tupdesc->attrs[i]->attisdropped)
|
||||
return false;
|
||||
name = NameStr(tupdesc->attrs[i]->attname);
|
||||
+#else
|
||||
+ if (TupleDescAttr(tupdesc, i)->attisdropped)
|
||||
+ return false;
|
||||
+ name = NameStr(TupleDescAttr(tupdesc, i)->attname);
|
||||
+#endif
|
||||
if (is_magic_field(name)) {
|
||||
ev->tgargs->custom_fields = 1;
|
||||
return false;
|
26
databases/skytools/files/patch-sql_pgq_triggers_logutriga.c
Normal file
26
databases/skytools/files/patch-sql_pgq_triggers_logutriga.c
Normal file
@ -0,0 +1,26 @@
|
||||
--- sql/pgq/triggers/logutriga.c.orig 2019-08-05 04:38:03 UTC
|
||||
+++ sql/pgq/triggers/logutriga.c
|
||||
@@ -54,7 +54,11 @@ static int is_interesting_change(PgqTriggerEvent *ev,
|
||||
/*
|
||||
* Ignore dropped columns
|
||||
*/
|
||||
+#if PG_VERSION_NUM < 110000
|
||||
if (tupdesc->attrs[i]->attisdropped)
|
||||
+#else
|
||||
+ if (TupleDescAttr(tupdesc, i)->attisdropped)
|
||||
+#endif
|
||||
continue;
|
||||
attkind_idx++;
|
||||
|
||||
@@ -145,7 +149,11 @@ void pgq_urlenc_row(PgqTriggerEvent *ev, HeapTuple row
|
||||
|
||||
for (i = 0; i < tg->tg_relation->rd_att->natts; i++) {
|
||||
/* Skip dropped columns */
|
||||
+#if PG_VERSION_NUM < 110000
|
||||
if (tupdesc->attrs[i]->attisdropped)
|
||||
+#else
|
||||
+ if (TupleDescAttr(tupdesc, i)->attisdropped)
|
||||
+#endif
|
||||
continue;
|
||||
|
||||
attkind_idx++;
|
86
databases/skytools/files/patch-sql_pgq_triggers_makesql.c
Normal file
86
databases/skytools/files/patch-sql_pgq_triggers_makesql.c
Normal file
@ -0,0 +1,86 @@
|
||||
--- sql/pgq/triggers/makesql.c.orig 2019-08-05 04:44:33 UTC
|
||||
+++ sql/pgq/triggers/makesql.c
|
||||
@@ -71,7 +71,11 @@ static void process_insert(PgqTriggerEvent *ev, String
|
||||
char *col_ident;
|
||||
|
||||
/* Skip dropped columns */
|
||||
+#if PG_VERSION_NUM < 110000
|
||||
if (tupdesc->attrs[i]->attisdropped)
|
||||
+#else
|
||||
+ if (TupleDescAttr(tupdesc, i)->attisdropped)
|
||||
+#endif
|
||||
continue;
|
||||
|
||||
/* Check if allowed by colstring */
|
||||
@@ -103,7 +107,11 @@ static void process_insert(PgqTriggerEvent *ev, String
|
||||
char *col_value;
|
||||
|
||||
/* Skip dropped columns */
|
||||
+#if PG_VERSION_NUM < 110000
|
||||
if (tupdesc->attrs[i]->attisdropped)
|
||||
+#else
|
||||
+ if (TupleDescAttr(tupdesc, i)->attisdropped)
|
||||
+#endif
|
||||
continue;
|
||||
|
||||
/* Check if allowed by colstring */
|
||||
@@ -154,7 +162,11 @@ static int process_update(PgqTriggerEvent *ev, StringI
|
||||
/*
|
||||
* Ignore dropped columns
|
||||
*/
|
||||
+#if PG_VERSION_NUM < 110000
|
||||
if (tupdesc->attrs[i]->attisdropped)
|
||||
+#else
|
||||
+ if (TupleDescAttr(tupdesc, i)->attisdropped)
|
||||
+#endif
|
||||
continue;
|
||||
|
||||
attkind_idx++;
|
||||
@@ -240,7 +252,11 @@ static int process_update(PgqTriggerEvent *ev, StringI
|
||||
return 0;
|
||||
|
||||
for (i = 0, attkind_idx = -1; i < tupdesc->natts; i++) {
|
||||
+#if PG_VERSION_NUM < 110000
|
||||
if (tupdesc->attrs[i]->attisdropped)
|
||||
+#else
|
||||
+ if (TupleDescAttr(tupdesc, i)->attisdropped)
|
||||
+#endif
|
||||
continue;
|
||||
|
||||
attkind_idx++;
|
||||
@@ -259,7 +275,11 @@ static int process_update(PgqTriggerEvent *ev, StringI
|
||||
/*
|
||||
* Ignore dropped columns
|
||||
*/
|
||||
+#if PG_VERSION_NUM < 110000
|
||||
if (tupdesc->attrs[i]->attisdropped)
|
||||
+#else
|
||||
+ if (TupleDescAttr(tupdesc, i)->attisdropped)
|
||||
+#endif
|
||||
continue;
|
||||
|
||||
attkind_idx++;
|
||||
@@ -291,7 +311,11 @@ static void process_delete(PgqTriggerEvent *ev, String
|
||||
int attkind_idx;
|
||||
|
||||
for (i = 0, attkind_idx = -1; i < tupdesc->natts; i++) {
|
||||
+#if PG_VERSION_NUM < 110000
|
||||
if (tupdesc->attrs[i]->attisdropped)
|
||||
+#else
|
||||
+ if (TupleDescAttr(tupdesc, i)->attisdropped)
|
||||
+#endif
|
||||
continue;
|
||||
|
||||
attkind_idx++;
|
||||
@@ -323,7 +347,11 @@ int pgqtriga_make_sql(PgqTriggerEvent *ev, StringInfo
|
||||
* Count number of active columns
|
||||
*/
|
||||
for (i = 0, attcnt = 0; i < tupdesc->natts; i++) {
|
||||
+#if PG_VERSION_NUM < 110000
|
||||
if (tupdesc->attrs[i]->attisdropped)
|
||||
+#else
|
||||
+ if (TupleDescAttr(tupdesc, i)->attisdropped)
|
||||
+#endif
|
||||
continue;
|
||||
attcnt++;
|
||||
}
|
14
databases/skytools/files/patch-sql_pgq_triggers_stringutil.c
Normal file
14
databases/skytools/files/patch-sql_pgq_triggers_stringutil.c
Normal file
@ -0,0 +1,14 @@
|
||||
--- sql/pgq/triggers/stringutil.c.orig 2019-08-05 04:48:30 UTC
|
||||
+++ sql/pgq/triggers/stringutil.c
|
||||
@@ -19,7 +19,11 @@
|
||||
#include <postgres.h>
|
||||
#include <lib/stringinfo.h>
|
||||
#include <mb/pg_wchar.h>
|
||||
+#if PG_VERSION_NUM < 110000
|
||||
#include <parser/keywords.h>
|
||||
+#else
|
||||
+#include <common/keywords.h>
|
||||
+#endif
|
||||
#include <utils/memutils.h>
|
||||
|
||||
#include "stringutil.h"
|
11
databases/skytools/files/patch-sql_txid_Makefile
Normal file
11
databases/skytools/files/patch-sql_txid_Makefile
Normal file
@ -0,0 +1,11 @@
|
||||
--- sql/txid/Makefile.orig 2013-07-29 08:14:55 UTC
|
||||
+++ sql/txid/Makefile
|
||||
@@ -12,7 +12,7 @@ pg83 = $(shell test $(PGVER) "<" "8.3" && echo "false"
|
||||
pg82 = $(shell test $(PGVER) "<" "8.2" && echo "false" || echo "true")
|
||||
endif
|
||||
|
||||
-ifeq ($(pg83),true) # we have 8.3 with internal txid
|
||||
+ifeq (1,1) # we always have >= 9.4 with internal txid
|
||||
|
||||
# install empty txid.sql
|
||||
DATA_built = txid.sql
|
Loading…
Reference in New Issue
Block a user