On 31/08/2017 18:20, Melvin Davidson wrote:
>you could just create an event trigger looking for CREATE TABLE as filter_value:
I have tried that. Unfortunately, I have been unable to extract the table name from the event because TG_TABLE_NAME is not
available during an event trigger, albeit perhaps I am missing something?
You need to use
ddl_command_end event and then select from pg_event_trigger_ddl_commands() . Search for some example how to do this.
That being said, I still believe it is extra work that could easily be avoided and should be added to the postgresql catalogs simply to be
more feature competitive with Oracle & SQL Server, as well as a boost to the PostgreSQL community.
--
Achilleas Mantzios
IT DEV Lead
IT DEPT
Dynacom Tankers Mgmt