2014/1/15 gmb <gmbouwer(at)gmail(dot)com>:
> I now want to add debugging to trigger_func_2 where I log the original
> statement (transaction?).
> I.e. I'm interested in something like "INSERT INTO table1.... "
> Anybody have any ideas on how I can get this original statement ?
You can log every single statement:
In postgresql.conf file, you can change the log_statement to 'all'.
BUT: it is dangerous in production: you can fill your file system very
fast and slow down the system.
Another way is: modify the trigger and write informations you need in
a specific table. Not an elegant solution but...
> Thanks
> GMB
Lucazeo.