Hello,
I would like to ask about a problem that is bothering me for a while now. We
have implemented monitoring of our queries using pg_stat_statements. The only
problem we have with it is that expressions with
IN ('first', 'second', 'third')
get translated into a query as
IN ($1, $2, $3)
and not as
IN $1
This obfuscates our monitoring because the same query with different amount of
arguments get translated into this:
IN ('first', 'second')
and so on.
I was trying to find some discussions about it, but could not find much. One
suggestion was to use
= ANY
but that is a problem when using some third party framework for db operations,
in our case for python, for example web2py's DAL or sqlalchemy.
Is there a possibility the pg_stat_statements will be improved with handling
IN? This problem makes it so much less useful right now.
Or is there something I could do to have the statistics for such queries
aggreageted? Or is there something else I am missing?
Best regards
Lukas Jerabek
Sent with [Proton Mail](https://proton.me/) secure email.