From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Ken Tanzer <ken.tanzer@gmail.com>
To: PG-General Mailing List <pgsql-general@postgresql.org>
Subject: Re: Compiling table_log for PG 11 / attisdropped
Date: Fri, 12 Jul 2019 13:42:26 -0700
Message-ID: <3a2d53d8-8aca-5978-7e87-7ad9f961c93a@aklaver.com> (raw)
In-Reply-To: <CAD3a31U+=2d-HnkRg_+asYP63PZm6w6e_xPyZRWw5JDZQuCFbQ@mail.gmail.com>
References: <CAD3a31U+=2d-HnkRg_+asYP63PZm6w6e_xPyZRWw5JDZQuCFbQ@mail.gmail.com>
On 7/12/19 1:19 PM, Ken Tanzer wrote:
> Hi. I'm trying to update some databases from 9.6 to 11, and they use
> table_log for tracking changes to tables.
>
> I started with the most recent version I could find, a fork labeled
> version 0.5. [1]
What OS.version and compiler/version?
Some digging found the below, which is similar:
https://trac.osgeo.org/postgis/ticket/3814https://trac.osgeo.org/postgis/changeset/15653>
> This version compiles on both 9.6, and 10, but on 11 it fails with these
> errors:
>
> table_log.c: In function ‘count_columns’:
> table_log.c:80:27: error: invalid type argument of ‘->’ (have
> ‘FormData_pg_attribute’)
> if (!tupleDesc->attrs[i]->attisdropped)
If I am following the issue correctly then the above becomes:
if (!tupleDesc->attrs[i].attisdropped)
> ^
> table_log.c: In function ‘__table_log’:
> table_log.c:339:56: error: invalid type argument of ‘->’ (have
> ‘FormData_pg_attribute’)
> if (trigdata->tg_relation->rd_att->attrs[col_nr - 1]->attisdropped)
> ^
> table_log.c:373:56: error: invalid type argument of ‘->’ (have
> ‘FormData_pg_attribute’)
> if (trigdata->tg_relation->rd_att->attrs[col_nr - 1]->attisdropped)
and above becomes:
*[col_nr - 1].attisdropped
>
> Can anyone shed any light on these errors, and/or how they might be fixed?
>
> (I did try filing an issue with this project [2], but since there is no
> activity there I'm turning to this mailing list.)
> (Also, I know table_log is quite old and there are better alternatives.
> If I were starting fresh I would surely use them. But it works for my
> simple needs, and I have a lot of legacy data accumulated, so I would
> really like to avoid switching to a new or different logging system.)
>
> Thanks in advance,
> Ken
>
> [1] Table log: https://github.com/psoo/table_log
> [2] Issue filed: https://github.com/psoo/table_log/issues/2
> [3] table_log.c: https://github.com/psoo/table_log/blob/master/table_log.c
>
>
>
> --
> AGENCY Software
> A Free Software data system
> By and for non-profits
> /http://agency-software.org//
> /https://demo.agency-software.org/client/
> ken.tanzer@agency-software.org <mailto:ken.tanzer@agency-software.org>
> (253) 245-3801
>
> Subscribe to the mailing list
> <mailto:agency-general-request@lists.sourceforge.net?body=subscribe> to
> learn more about AGENCY or
> follow the discussion.
--
Adrian Klaver
adrian.klaver@aklaver.com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: adrian.klaver@aklaver.com, ken.tanzer@gmail.com
Subject: Re: Compiling table_log for PG 11 / attisdropped
In-Reply-To: <3a2d53d8-8aca-5978-7e87-7ad9f961c93a@aklaver.com>
References: <CAD3a31U+=2d-HnkRg_+asYP63PZm6w6e_xPyZRWw5JDZQuCFbQ@mail.gmail.com> <3a2d53d8-8aca-5978-7e87-7ad9f961c93a@aklaver.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox