I'm attempting to put together what I thought would be a simple audit ability in Postgres.
I intend to log session_id/user_id etc., but what I'm really after is logging the actual statement, in full. I know I can get the operation with TG_OP, but does anybody know the secret sauce to get the actual text of the current statement?
Add a comment
|