Re: Way to quickly detect if database tables/columns/etc. were modified? - Mailing list pgsql-general

From John DeSoi
Subject Re: Way to quickly detect if database tables/columns/etc. were modified?
Date
Msg-id F7797C11-F9E5-436A-82CE-230611DFC298@pgedit.com
Whole thread Raw
In response to Re: Way to quickly detect if database tables/columns/etc. were modified?  (Melvin Davidson <melvin6925@gmail.com>)
Responses Re: Way to quickly detect if database tables/columns/etc. were modified?  (Melvin Davidson <melvin6925@gmail.com>)
List pgsql-general
> On Oct 31, 2016, at 8:14 AM, Melvin Davidson <melvin6925@gmail.com> wrote:
>
> That would certainly work, but the problem is, that trigger would have to be created for every table in the database.

> When you have more than a couple dozen tables, as in hundreds, it becsmes a huge undertaking.

Unless I'm misunderstanding the documentation, you create the trigger on the "ddl event" not a  table. The events are
ddl_command_start,ddl_command_end, table_rewrite and sql_drop. I have not used this feature, but it seems like you
wouldjust need one function. 

https://www.postgresql.org/docs/current/static/event-trigger-definition.html

John DeSoi, Ph.D.



pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: Rows are repeating by the trigger function
Next
From: "Igal @ Lucee.org"
Date:
Subject: RPM Package of PostgreSQL 9.6.1 for CentOS