pgsql: Simplify redundant current_database() subqueries in stats.sql re

From: Fujii Masao <fujii(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Simplify redundant current_database() subqueries in stats.sql re
Date: 2026-04-06 04:21:44
Message-ID: E1w9bT5-003BGW-11@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Simplify redundant current_database() subqueries in stats.sql regression test

Previously the stats.sql regression test used conditions like
"datname = (SELECT current_database())" to check the current database name.

The subquery is unnecessary, so this commit simplifies these expressions to
"datname = current_database()".

Author: Chao Li <lic(at)highgo(dot)com>
Reviewed-by: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Discussion: https://postgr.es/m/A1535A8F-65AF-4C3D-ACBE-25891CB5D38B@gmail.com

Branch
------
master

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

Modified Files
--------------
src/test/regress/expected/stats.out | 12 ++++++------
src/test/regress/sql/stats.sql | 12 ++++++------
2 files changed, 12 insertions(+), 12 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2026-04-06 04:23:39 pgsql: Improve more stability of worker_spi termination test
Previous Message Richard Guo 2026-04-06 02:55:35 pgsql: Fix volatile function evaluation in eager aggregation