On 2018-Nov-28, Tom Lane wrote:
> Sergei Agalakov <sergei.agalakov@gmail.com> writes:
> > It would help to analyze performance issues if pg_stat_statements would
> > extend the object names to the qualified names.
>
> What pg_stat_statements puts out is the original query text. As was
> already pointed out to you, changing that text is likely to break
> use-cases in which people are trying to match entries to actual
> queries or log entries.
It's not immediately obvious, but he is proposing a _new_ column
query_qn that has qualified names, leaving the current query column
unchanged.
> This would also entail rather significant overhead to find out schema
> names and interpolate them into the text.
True. I was thinking that the qualified-names version of the query
would be obtained via ruleutils or some similar mechanism to deparse
from the parsed query tree (not from the original query text), where
only pg_catalog is considered visible. This would be enabled using a
GUC that defaults to off.
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services