pgsql: pg_stat_statements: Add more tests with temp tables and namespac

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: pg_stat_statements: Add more tests with temp tables and namespac
Date: 2025-03-25 22:34:51
Message-ID: E1txCrD-000zZ5-0E@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

pg_stat_statements: Add more tests with temp tables and namespaces

These tests provide coverage for RangeTblEntry and how query jumbling
works with search_path, as well as the case where relations are
re-created, generating a different query ID as the relation OID is used
in the computation.

A patch is under discussion to switch to a different approach based on
the relation name, and there was no test coverage for this area,
including how queries are currently grouped with search_path. This is
useful to track how the situation changes between HEAD and any patches
proposed.

Christoph has proposed the test with ON COMMIT DROP temporary tables,
and I have written the second part.

Author: Christoph Berg <myon(at)debian(dot)org>
Author: Michael Paquier <michael(at)paquier(dot)xyz>
Discussion: https://postgr.es/m/Z9iWXKGwkm8RAC93@msg.df7cb.de

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/3430215fe35f96e4be355c93e275f00656800602

Modified Files
--------------
contrib/pg_stat_statements/expected/select.out | 240 +++++++++++++++++++++++++
contrib/pg_stat_statements/sql/select.sql | 69 +++++++
2 files changed, 309 insertions(+)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2025-03-26 00:04:06 pgsql: Fix order of -I switches for building pg_regress.o.
Previous Message Laurenz Albe 2025-03-25 21:24:15 Re: Squash constant lists in query jumbling by default