On Mon, Oct 31, 2016 at 2:09 PM, John DeSoi <desoi@pgedit.com> wrote:
> 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 would just need one function.