How Do You Associate a Query With its Invoking Procedure?

Fred Habash <fmhabash@gmail.com>

From: Fd Habash <fmhabash@gmail.com>
To: "pgsql-performance@lists.postgresql.org" <pgsql-performance@lists.postgresql.org>
Date: 2018-09-13T19:49:41Z
Lists: pgsql-performance
In API function may invoke 10 queries. Ideally, I would like to know what queries are invoked by it and how long each took. 

I’m using pg_stat_statement. I can see the API function statement, but how do I deterministically identify all queries invoked by it?


----------------
Thank you