pgsql: Add assert checking to pg_leftmost_one_pos32() and friends

2023-02-19 Thread John Naylor
Add assert checking to pg_leftmost_one_pos32() and friends Discussion: https://www.postgresql.org/message-id/CAFBsxsEPc%2BFnX_0vmmQ5DHv60sk4rL_RZJ%2BMD6ei%3D76L0kFMvA%40mail.gmail.com Branch -- master Details ---

pgsql: Speedup and increase usability of set proc title functions

2023-02-19 Thread David Rowley
Speedup and increase usability of set proc title functions The setting of the process title could be seen on profiles of very fast-to-execute queries. In many locations where we call set_ps_display() we pass along a string constant, the length of which is known during compilation. Here we

pgsql: Expand regression tests of pg_stat_statements for utility querie

2023-02-19 Thread Michael Paquier
Expand regression tests of pg_stat_statements for utility queries This commit adds more coverage for utility statements so as it is possible to track down all the effects of query normalization done for all the queries that use either Const or A_Const nodes, which are the nodes where

pgsql: Refactor tests of pg_stat_statements for planning, utility and l

2023-02-19 Thread Michael Paquier
Refactor tests of pg_stat_statements for planning, utility and level tracking pg_stat_statements.sql acts as the main file for all the core tests of the module, but things have become complicated to follow over the years as some of the sub-scenarios tested in this file rely on assumptions that