From: | "Vasudevan, Ramya" <ramya(dot)vasudevan(at)classmates(dot)com> |
---|---|
To: | hubert depesz lubaczewski <depesz(at)gmail(dot)com> |
Cc: | "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: event triggers in 9.3.4 |
Date: | 2014-07-24 17:13:04 |
Message-ID: | 20EE50F73664E744AF948F0106FE6DFA585A7DDD@SEAMBX01.sea.corp.int.untd.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
>> You could compare list of tables before (_start) and after (_end) the ddl. Doing it in plpgsql will be tricky, but if you'd use some other language - like plperl - it's relatively simple: http://www.depesz.com/2013/12/18/waiting-for-9-4-plperl-add-event-trigger-support/
Thank You Depesz. This will work for ‘CREATE’ and ‘DROP’ DDLs.
But, what about the scenario where I want to just have event triggers for operations like these? - 'ALTER TABLE','ALTER TRIGGER', 'ALTER FUNCTION'
CREATE EVENT TRIGGER log_ddl_info_start
ON
ddl_command_start
when
tag in
('ALTER TABLE','ALTER TRIGGER','CREATE FUNCTION','ALTER FUNCTION')
EXECUTE PROCEDURE
log_ddl_execution();
In this case, is there a way to capture the object that was altered?
Thank You
Ramya
From | Date | Subject | |
---|---|---|---|
Next Message | Seref Arikan | 2014-07-24 17:33:31 | Are queries run completely before a Cursor can be used? |
Previous Message | Adrian Klaver | 2014-07-24 17:12:05 | Re: tab_to_sting |