pgsql: Convert ddlutils regression tests to TAP tests.

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Convert ddlutils regression tests to TAP tests.
Date: 2026-04-29 15:34:31
Message-ID: E1wI6vm-003LSh-25@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Convert ddlutils regression tests to TAP tests.

The regression tests for pg_get_role_ddl(), pg_get_database_ddl(),
and pg_get_tablespace_ddl() created databases and tablespaces, which
are heavyweight operations. As noted by Andres Freund, this is
wasteful in the core regression suite which gets run repeatedly.

Convert the three test files (role_ddl.sql, database_ddl.sql,
tablespace_ddl.sql) into a single TAP test that runs once, covering
all the same functionality: basic DDL generation, pretty-printing,
option handling, error cases, permission checks, and edge cases like
quoted names and role memberships.

Discussion: https://postgr.es/m/5c67dc79-909a-4e17-8606-6686667da6c6@dunslane.net

Branch
------
master

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

Modified Files
--------------
src/test/modules/test_misc/meson.build | 1 +
src/test/modules/test_misc/t/012_ddlutils.pl | 286 +++++++++++++++++++++++++++
src/test/regress/expected/database_ddl.out | 88 ---------
src/test/regress/expected/role_ddl.out | 143 --------------
src/test/regress/expected/tablespace_ddl.out | 84 --------
src/test/regress/parallel_schedule | 1 -
src/test/regress/sql/database_ddl.sql | 66 -------
src/test/regress/sql/role_ddl.sql | 96 ---------
src/test/regress/sql/tablespace_ddl.sql | 58 ------
9 files changed, 287 insertions(+), 536 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Andrew Dunstan 2026-04-29 16:02:03 pgsql: Fix timezone dependence in test_misc/012_ddlutils.pl
Previous Message Peter Geoghegan 2026-04-29 15:23:36 pgsql: Fix nbtree skip array parallel alloc accounting.