I'm trying to save all ddl scripts that runs on the database in a table. In SQL Server this could be achieved by setting a DDL Trigger on the database and getting the scripts from the EVENT_DATA object in the trigger context. So far, I haven't found a way do the same thing in PostgreSQL.
Is it even possible?
Asked
Active
Viewed 314 times
1

Yuval Perelman
- 4,499
- 1
- 22
- 32
-
1This might point you a direction: https://stackoverflow.com/questions/23488228/how-to-get-sql-text-from-postgres-event-trigger – sticky bit Dec 30 '18 at 16:44
-
3or just configure: `log_statement='ddl';` – wildplasser Dec 30 '18 at 16:47
-
1This might be better asked on the DBA Stack Exchange, a sister site of Stack Overflow. – Basil Bourque Dec 30 '18 at 17:07