table_log.c:76:29: error: member reference type 'FormData_pg_attribute' (aka 'struct FormData_pg_attribute') is not a pointer; did you mean to use '.'?
if (!tupleDesc->attrs[i]->attisdropped) {
~~~~~~~~~~~~~~~~~~~^~
.
table_log.c:303:59: error: member reference type 'FormData_pg_attribute' (aka 'struct FormData_pg_attribute') is not a pointer; did you mean to use '.'?
if (trigdata->tg_relation->rd_att->attrs[col_nr - 1]->attisdropped) {
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
.
table_log.c:348:59: error: member reference type 'FormData_pg_attribute' (aka 'struct FormData_pg_attribute') is not a pointer; did you mean to use '.'?
if (trigdata->tg_relation->rd_att->attrs[col_nr - 1]->attisdropped) {
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
.
table_log.c:375:59: error: member reference type 'FormData_pg_attribute' (aka 'struct FormData_pg_attribute') is not a pointer; did you mean to use '.'?
if (trigdata->tg_relation->rd_att->attrs[col_nr - 1]->attisdropped) {
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
.
4 errors generated.
http://package18.nyi.freebsd.org/data/120amd64-default-PR239514/2019-07-29_20h41m52s/logs/tablelog-0.4.4_3.log
While here
- Mark it as deprecated. The last release was in 2007 and upstream
has been inactive since then.
- Fix WWW
PR: 239514
Reported by: antoine (via exp-run)
60 lines
1.7 KiB
C
60 lines
1.7 KiB
C
--- table_log.c.orig 2007-05-16 23:14:04 UTC
|
|
+++ table_log.c
|
|
@@ -22,6 +22,8 @@
|
|
#include "utils/formatting.h"
|
|
#include "utils/builtins.h"
|
|
#include <utils/lsyscache.h>
|
|
+#include <utils/rel.h>
|
|
+#include <utils/timestamp.h>
|
|
#include <funcapi.h>
|
|
|
|
/* for PostgreSQL >= 8.2.x */
|
|
@@ -71,7 +73,11 @@ int count_columns (TupleDesc tupleDesc) {
|
|
int i;
|
|
|
|
for (i = 0; i < tupleDesc->natts; ++i) {
|
|
+#if PG_VERSION_NUM < 110000
|
|
if (!tupleDesc->attrs[i]->attisdropped) {
|
|
+#else
|
|
+ if (!tupleDesc->attrs[i].attisdropped) {
|
|
+#endif
|
|
++count;
|
|
}
|
|
}
|
|
@@ -298,7 +304,11 @@ static void __table_log (TriggerData *trigdata, char *
|
|
col_nr++;
|
|
found_col = 0;
|
|
do {
|
|
+#if PG_VERSION_NUM < 110000
|
|
if (trigdata->tg_relation->rd_att->attrs[col_nr - 1]->attisdropped) {
|
|
+#else
|
|
+ if (trigdata->tg_relation->rd_att->attrs[col_nr - 1].attisdropped) {
|
|
+#endif
|
|
/* this column is dropped, skip it */
|
|
col_nr++;
|
|
continue;
|
|
@@ -343,7 +353,11 @@ static void __table_log (TriggerData *trigdata, char *
|
|
col_nr++;
|
|
found_col = 0;
|
|
do {
|
|
+#if PG_VERSION_NUM < 110000
|
|
if (trigdata->tg_relation->rd_att->attrs[col_nr - 1]->attisdropped) {
|
|
+#else
|
|
+ if (trigdata->tg_relation->rd_att->attrs[col_nr - 1].attisdropped) {
|
|
+#endif
|
|
/* this column is dropped, skip it */
|
|
col_nr++;
|
|
continue;
|
|
@@ -370,7 +384,11 @@ static void __table_log (TriggerData *trigdata, char *
|
|
col_nr++;
|
|
found_col = 0;
|
|
do {
|
|
+#if PG_VERSION_NUM < 110000
|
|
if (trigdata->tg_relation->rd_att->attrs[col_nr - 1]->attisdropped) {
|
|
+#else
|
|
+ if (trigdata->tg_relation->rd_att->attrs[col_nr - 1].attisdropped) {
|
|
+#endif
|
|
/* this column is dropped, skip it */
|
|
col_nr++;
|
|
continue;
|