Hi,
The proposal by Bertrand in CC to jumble CALL and SET in [1] was
rejected at the time for a more robust solution to jumble DDL.
Michael also in CC made this possible with commit 3db72ebcbe.
The attached patch takes advantage of the jumbling infrastructure
added in the above mentioned commit and jumbles the CALL statement
in pg_stat_statements.
The patch also modifies existing test cases for CALL handling in pg_stat_statements
and adds additional tests which prove that a CALL to an overloaded procedure
will generate a different query_id.
As far as the SET command mentioned in [1] is concerned, it is a bit more complex
as it requires us to deal with A_Constants which is not very straightforward. We can surely
deal with SET currently by applying custom query jumbling logic to VariableSetStmt,
but this can be dealt with in a separate discussion.
Regards,
Sami Imseih
Amazon Web Services (AWS)
[1] https://www.postgresql.org/message-id/flat/36e5bffe-e989-194f-85c8-06e7bc88e6f7%40amazon.com