pgsql: Refactor more the regression tests of pg_stat_statements

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Refactor more the regression tests of pg_stat_statements
Date: 2023-03-02 23:47:05
Message-ID: E1pXsdc-001bAy-KH@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Refactor more the regression tests of pg_stat_statements

This commit expands more the refactoring of the regression tests of
pg_stat_statements, with tests moved out of pg_stat_statements.sql into
separate files. The following file structure is now used:
- select is mostly the former pg_stat_statements.sql, renamed.
- dml for INSERT/UPDATE/DELETE and MERGE
- user_activity, to test role-level checks and stat resets.
- wal, to check the WAL generation after some queries.

Like e8dbdb1, there is no change in terms of code coverage or results,
and this finishes the split I was aiming for in these tests. Most of
the tests used "test" of "pgss_test" as names for the tables used, these
are renamed to less generic names.

Reviewed-by: Bertrand Drouvot
Discussion: https://postgr.es/m/Y/7Y9U/y/keAW3qH(at)paquier(dot)xyz

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/d0028e35a05ac71aebf28325c8ddb59a27cb63c0

Modified Files
--------------
contrib/pg_stat_statements/Makefile | 4 +-
contrib/pg_stat_statements/expected/dml.out | 147 ++++
.../expected/pg_stat_statements.out | 768 ---------------------
contrib/pg_stat_statements/expected/select.out | 414 +++++++++++
.../pg_stat_statements/expected/user_activity.out | 199 ++++++
contrib/pg_stat_statements/expected/wal.out | 33 +
contrib/pg_stat_statements/meson.build | 5 +-
contrib/pg_stat_statements/sql/dml.sql | 76 ++
.../pg_stat_statements/sql/pg_stat_statements.sql | 300 --------
contrib/pg_stat_statements/sql/select.sql | 149 ++++
contrib/pg_stat_statements/sql/user_activity.sql | 65 ++
contrib/pg_stat_statements/sql/wal.sql | 20 +
12 files changed, 1109 insertions(+), 1071 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2023-03-03 01:43:26 pgsql: Force testing of query jumbling in 027_stream_regress.pl
Previous Message Tom Lane 2023-03-02 22:47:34 pgsql: Harden new test case against force_parallel_mode = regress.