As you can see, the current implementation of event triggers in PL/pgsql and PostgreSQL 9.4 is rather limited. However, there are more changes and features planned for the upcoming releases that will expand the scope, in which event triggers will become more useful. Here are the highlights of what we can look forward to in the future:
TG_*
variables are going to be available, in order to provide more information about the command that is running and on which object it is running. We can look forward to the following variables in future PostgreSQL versions:TG_OBJECTID
TG_OBJECTNAME
TG_SCHEMANAME
TG_OPERATION
TG_OBTYPENAME
TG_CONTEXT
pg_get_event_command_string
function will give the full command string of the DDL command that caused the event trigger to fire.pg_get_event_command_string()
DROP CASCADE
call.INSTEAD OF DML
triggers.If you want to learn more about the features in progress and the patches, which are being discussed related to event trigger support in PostgreSQL, please follow the wiki page at https://wiki.postgresql.org/wiki/Event_Triggers.
18.222.156.75