March 8th, 2012, 02:49 PM
Trigger (or something similar) on CREATE TABLE?
I am new to PostgreSQL, but have a bit of experience with MySQL.
I would like to create a trigger on the CREATE TABLE function, such that every time a SQL user wants to create a table in my database, a "hidden" column is automatically added to that table.
I know I can create triggers for INSERT/ UPDATE/ DELETE. My question is, is there a way to create one on the CREATE TABLE function, or a way to modify the function so it calls a function of my own?
March 8th, 2012, 03:49 PM
No, PostgreSQL does not have DDL triggers.
Originally Posted by kjb7
March 8th, 2012, 03:59 PM
Is there an alternative action I could take that would have the same, or a similar, effect?