Search Postgresql Archives

Re: How to watch for schema changes

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

 



On 12/3/18 1:53 PM, Igor Korot wrote:
Hi, Adrian,

Why? Just create the trigger once in a script. Event triggers are an
attribute of the database and stay with it until they are dropped. If
you want to turn then on and off use the ALTER  EVENT TRIGGER
ENABLE/DISABLE. If you insist on recreating them on each connection then:

https://www.postgresql.org/docs/10/sql-dropeventtrigger.html
DROP EVENT TRIGGER [ IF EXISTS ] name [ CASCADE | RESTRICT ]
CREATE EVENT TRIGGER ...

I was hoping to create a software which will be just "install-and-use".
No additional script running or database changes is required.

After I hit reply my subconscious kicked in and pointed out something:)

If there are no database changes why do you need to track schema changes?


But I will probably create it on every connection and delete on the
disconnect (see above).


--
Adrian Klaver
adrian.klaver@xxxxxxxxxxx




[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