Re: debugging triggers - get original statement? - Mailing list pgsql-sql

From Luca Vernini
Subject Re: debugging triggers - get original statement?
Date
Msg-id CAHZ=uVCV-u25SEFSHaHWQshbRO0Lu037S4yRabN8=4kdSKo5ew@mail.gmail.com
Whole thread Raw
In response to debugging triggers - get original statement?  (gmb <gmbouwer@gmail.com>)
Responses Re: debugging triggers - get original statement?
List pgsql-sql
2014/1/15 gmb <gmbouwer@gmail.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.



pgsql-sql by date:

Previous
From: gmb
Date:
Subject: debugging triggers - get original statement?
Next
From: gmb
Date:
Subject: Re: debugging triggers - get original statement?