0

I'm looking for a way to log queries launched inside trigger procedures. after setting: log_statement = 'mod' in config i can see queries launched by application, but select's inserts and other queries launched inside trigger procedure are not available in log file. is there any way to show those queries

1 Answer 1

1

Try this http://www.postgresql.org/docs/current/static/pgstatstatements.html It creates a special table with all queries, the server executes.

You will need pg_stat_statements.track ('all').

If you need only to track the statements of the trigger consider setting pg_stat_statements.track ('none') and then pg_stat_statements.track ('all') right before the query that will call trigger. pg_stat_statements.track ('none') again after the trigger.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.