postgresql/src
Michael Paquier 11c34b342b Show parameters of CALL as constants in pg_stat_statements
This commit changes the query jumbling of CallStmt so as its IN/OUT
parameters are able to show up as constants with a parameter symbol in
pg_stat_statements, like:
CALL proc1($1, $2);
CALL proc2($1, $2, $3);

The transformed FuncExpr is used in the query ID computation instead of
the FuncCall generated by the parser, so as it is sensitive to the OID
of the procedure and its list of input arguments.  The output arguments
are handled in a separate list in CallStmt, which is also included in
the computation.

Tests are added to pg_stat_statements to show how this affects CALL with
IN/OUT parameters as well as overloaded functions.

Like 638d42a3c5 or 31de7e60da, this improves the monitoring of
workloads with a lot of CALL statements, preventing unnecessary bloat
when these use different input (or event output) values.

Author: Sami Imseih
Discussion: https://postgr.es/m/B44FA29D-EBD0-4DD9-ABC2-16F1CB087074@amazon.com
2023-09-28 15:17:55 +09:00
..
backend Remove obsolete executor cleanup code 2023-09-28 09:44:39 +09:00
bin pgbench: Improve help output of -I option 2023-09-26 22:09:07 +01:00
common Add function for removing arbitrary nodes in binaryheap. 2023-09-18 14:06:08 -07:00
fe_utils Allow using syncfs() in frontend utilities. 2023-09-06 16:27:16 -07:00
include Show parameters of CALL as constants in pg_stat_statements 2023-09-28 15:17:55 +09:00
interfaces Add some const qualifiers 2023-09-26 11:28:57 +01:00
makefiles Remove --disable-thread-safety and related code. 2023-07-12 08:20:43 +12:00
pl Collect dependency information for parsed CallStmts. 2023-09-25 14:42:17 -04:00
port Meson: check for pg_config_paths.h left over from make 2023-08-24 10:33:53 +12:00
template Use unnamed POSIX semaphores on Cygwin. 2023-01-06 10:33:28 +13:00
test Fix edge-case for xl_tot_len broken by bae868ca. 2023-09-26 10:53:38 +13:00
timezone Pre-beta mechanical code beautification. 2023-05-19 17:24:48 -04:00
tools Fix MSVC build for changes to binaryheap. 2023-09-18 12:46:57 -07:00
tutorial Pre-beta mechanical code beautification. 2023-05-19 17:24:48 -04:00
.gitignore
DEVELOPERS
Makefile Integrate pg_bsd_indent into our build/test infrastructure. 2023-02-12 12:22:21 -05:00
Makefile.global.in Update Unicode data to Unicode 15.1.0 2023-09-18 07:26:34 +02:00
Makefile.shlib Stop using "-multiply_defined suppress" on macOS. 2023-09-26 21:06:21 -04:00
meson.build Integrate pg_bsd_indent into our build/test infrastructure. 2023-02-12 12:22:21 -05:00
nls-global.mk Fix for make unportability 2022-07-13 09:15:01 +02:00