Re: Auditing extension for PostgreSQL (Take 2)

From: David Steele <david(at)pgmasters(dot)net>
To: Sawada Masahiko <sawada(dot)mshk(at)gmail(dot)com>
Cc: Abhijit Menon-Sen <ams(at)2ndquadrant(dot)com>, Stephen Frost <sfrost(at)snowman(dot)net>, Álvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Auditing extension for PostgreSQL (Take 2)
Date: 2015-03-23 18:30:53
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On 3/23/15 1:39 PM, Sawada Masahiko wrote:
> On Tue, Mar 24, 2015 at 1:40 AM, David Steele <david(at)pgmasters(dot)net> wrote:
>> I have prepared a patch that brings event triggers and deparse back to
>> pg_audit based on the Alvaro's dev/deparse branch at
>> git:// (commit 0447fc5). I've
>> updated the unit tests accordingly.
>> I've been hesitant to post this patch as it will not work in master
>> (though it will compile), but I don't want to hold on to it any longer
>> since the end of the CF is nominally just weeks away. If you want to
>> run the patch in master, you'll need to disable the
>> pg_audit_ddl_command_end trigger.
> Hi,
> I tied to look into latest patch, but got following error.
> masahiko [pg_audit] $ LANG=C make
> gcc -Wall -Wmissing-prototypes -Wpointer-arith
> -Wdeclaration-after-statement -Wendif-labels
> -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing
> -fwrapv -g -fpic -I. -I. -I../../src/include -D_GNU_SOURCE -c -o
> pg_audit.o pg_audit.c
> pg_audit.c: In function 'log_audit_event':
> pg_audit.c:456: warning: ISO C90 forbids mixed declarations and code
> pg_audit.c: In function 'pg_audit_ddl_command_end':
> pg_audit.c:1436: error: 'pg_event_trigger_expand_command' undeclared
> (first use in this function)
> pg_audit.c:1436: error: (Each undeclared identifier is reported only once
> pg_audit.c:1436: error: for each function it appears in.)
> make: *** [pg_audit.o] Error 1
> Am I missing something?

It's my mistake. I indicated that this would compile under master - but
that turns out not to be true because of this function. It will only
compile cleanly in Alvaro's branch mentioned above.

My apologies - this is why I have been hesitant to post this patch
before. You are welcome to try with Alvaro's deparse branch or wait
until it has been committed to master.

I've attached patch v5 only to cleanup the warnings you saw.

- David Steele

Attachment Content-Type Size
pg_audit-v5.patch text/plain 101.1 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2015-03-23 18:46:48 Re: logical column ordering
Previous Message Alvaro Herrera 2015-03-23 18:17:24 Re: Auditing extension for PostgreSQL (Take 2)