Search Postgresql Archives

Re: Way to quickly detect if database tables/columns/etc. were modified?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> On Oct 31, 2016, at 8:14 AM, Melvin Davidson <melvin6925@xxxxxxxxx> 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.

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

John DeSoi, Ph.D.



-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux