Skip to main content
2 of 2
replaced http://serverfault.com/ with https://serverfault.com/

The auto_explain module has auto_explain.log_nested_statements since at least 8.4, so that's one option. It's a bit heavyweight but I'm not aware of any other logging option that will record statements run inside PL/PgSQL functions and triggers.

See this similar question.

Craig Ringer
  • 57.3k
  • 6
  • 159
  • 192