agora inbox for pgsql-committers@postgresql.org  
help / color / mirror / Atom feed
From: Andrew Dunstan <andrew@dunslane.net>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Convert ddlutils regression tests to TAP tests.
Date: Wed, 29 Apr 2026 15:34:31 +0000
Message-ID: <E1wI6vm-003LSh-25@gemulon.postgresql.org> (raw)

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(-)



Message-ID: <E1wI6vm-003LSh-25@gemulon.postgresql.org>
Permalink:  ../E1wI6vm-003LSh-25@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1wI6vm-003LSh-25@gemulon.postgresql.org

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: andrew@dunslane.net, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Convert ddlutils regression tests to TAP tests.
  In-Reply-To: <E1wI6vm-003LSh-25@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox