I am try to enhance plpgsql_check about profiler functionality and I have to solve how to identify every plpgsql statement across different sessions. There is lineno, but surely it should not be unique. I propose introduce stmtid to every statement structure. This number will be unique inside function.