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

Поиск
Список
Период
Сортировка
От John DeSoi
Тема Re: Way to quickly detect if database tables/columns/etc. were modified?
Дата
Msg-id F7797C11-F9E5-436A-82CE-230611DFC298@pgedit.com
обсуждение исходный текст
Ответ на Re: Way to quickly detect if database tables/columns/etc. were modified?  (Melvin Davidson <melvin6925@gmail.com>)
Ответы Re: Way to quickly detect if database tables/columns/etc. were modified?  (Melvin Davidson <melvin6925@gmail.com>)
Список 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 по дате отправления:

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: Rows are repeating by the trigger function
Следующее
От: "Igal @ Lucee.org"
Дата:
Сообщение: RPM Package of PostgreSQL 9.6.1 for CentOS