From fd977063723dc107eca44da759571404079a13a8 Mon Sep 17 00:00:00 2001 From: jnasbyupgrade Date: Tue, 29 Sep 2026 16:11:08 -0500 Subject: [PATCH 1/2] Set ON_ERROR_STOP in test/install/load.sql Errors in this file were never detected: pg_regress resolves its expected and result paths to the same file, so it can never diff. Co-Authored-By: Claude Sonnet 5.5 --- test/install/load.sql | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/install/load.sql b/test/install/load.sql index e3904d7..a54c107 100644 --- a/test/install/load.sql +++ b/test/install/load.sql @@ -1,4 +1,6 @@ \set ECHO none +-- Without this an error in this file goes undetected (pg_regress never diffs it) +\set ON_ERROR_STOP on /* * Committed-once installer for the test suite's one real dependency: the * extension_drop extension itself. (No test roles exist for this extension @@ -155,6 +157,7 @@ CREATE SCHEMA :"extension_drop_test_schema"; * explicitly first instead (CREATE EXTENSION ... CASCADE was only added in * PG10, though event triggers themselves exist from 9.3). */ +-- \if needs psql 10+ (effective floor is PG12); a pre-PG10 leg would need these branches server-side \if :extension_drop_pg10_plus \else CREATE EXTENSION IF NOT EXISTS cat_tools; From 5382f1a44c8ea16bfde2ba89cf2a2584d8e879b7 Mon Sep 17 00:00:00 2001 From: jnasbyupgrade Date: Tue, 29 Sep 2026 16:14:43 -0500 Subject: [PATCH 2/2] load.sql: tighten ON_ERROR_STOP and \if comments Co-Authored-By: Claude Sonnet 5.5 --- test/install/load.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/install/load.sql b/test/install/load.sql index a54c107..6e4ea52 100644 --- a/test/install/load.sql +++ b/test/install/load.sql @@ -1,5 +1,5 @@ \set ECHO none --- Without this an error in this file goes undetected (pg_regress never diffs it) +-- pg_regress never diffs this file, so make psql abort on error. \set ON_ERROR_STOP on /* * Committed-once installer for the test suite's one real dependency: the @@ -85,6 +85,7 @@ SELECT * dropping or reinstalling it would defeat the test. Fail loudly on absence * or mismatch. */ +-- \if requires psql 10+; safe because the floor is PG12. \if :extension_drop_mode_existing DO $DO$ DECLARE @@ -157,7 +158,6 @@ CREATE SCHEMA :"extension_drop_test_schema"; * explicitly first instead (CREATE EXTENSION ... CASCADE was only added in * PG10, though event triggers themselves exist from 9.3). */ --- \if needs psql 10+ (effective floor is PG12); a pre-PG10 leg would need these branches server-side \if :extension_drop_pg10_plus \else CREATE EXTENSION IF NOT EXISTS cat_tools;