From 596ca61b68a36133d2e71162a060678d5017b6b8 Mon Sep 17 00:00:00 2001 From: jnasbyupgrade Date: Wed, 12 Aug 2026 16:27:48 -0500 Subject: [PATCH 1/3] Bump .vendor/linter to pick up tightened comment-stacked-dashes rule Postgres-Extensions/linter#9 tightens comment-stacked-dashes to flag 2+ consecutive -- lines (previously 3+). Bumps b40aaf70 -> e4fab69e. --- .vendor/linter | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.vendor/linter b/.vendor/linter index b40aaf7..e4fab69 160000 --- a/.vendor/linter +++ b/.vendor/linter @@ -1 +1 @@ -Subproject commit b40aaf70be8af80f048da777e551c5b790bd9e69 +Subproject commit e4fab69e7f6256682f5b6b80e7a8f2423a0c39a9 From c52bce9efc09519d82ded85944f4f1c0716411f3 Mon Sep 17 00:00:00 2001 From: jnasbyupgrade Date: Wed, 12 Aug 2026 16:37:46 -0500 Subject: [PATCH 2/3] Convert 2-line -- comments to /* */ blocks for comment-stacked-dashes The bumped linter now flags 2+ consecutive -- lines (previously 3+). Rewriting the existing offenders as /* */ blocks is a pure formatting change; disable-block directives keep working since suppression is matched against raw line text regardless of comment state. --- sql/object_reference.sql | 24 ++++++++++++++++-------- test/dump/load_all.sql | 6 ++++-- test/dump/verify.sql | 12 ++++++++---- test/helpers/object_table.sql | 6 ++++-- test/sql/capture.sql | 6 ++++-- test/sql/event_trigger.sql | 6 ++++-- 6 files changed, 40 insertions(+), 20 deletions(-) diff --git a/sql/object_reference.sql b/sql/object_reference.sql index 1e35ef3..f369bae 100644 --- a/sql/object_reference.sql +++ b/sql/object_reference.sql @@ -1480,8 +1480,10 @@ BEGIN RAISE DEBUG 'dropped_objects(): %', r; END LOOP; - -- Multiple objects might have been affected - -- Could potentially be done with a writable CTE + /* + * Multiple objects might have been affected + * Could potentially be done with a writable CTE + */ FOR r_object_v IN SELECT _object_v.* FROM pg_catalog.pg_event_trigger_dropped_objects() d @@ -1570,20 +1572,26 @@ $$); CREATE EVENT TRIGGER zzz__object_reference_drop ON sql_drop - -- For debugging - --WHEN tag IN ( 'ALTER TABLE', 'DROP TABLE' ) + /* + * For debugging + * WHEN tag IN ( 'ALTER TABLE', 'DROP TABLE' ) + */ EXECUTE PROCEDURE _object_reference._etg_drop() ; CREATE EVENT TRIGGER zzz_object_reference__fix_identity ON ddl_command_end - -- For debugging - --WHEN tag IN ( 'ALTER TABLE', 'DROP TABLE' ) + /* + * For debugging + * WHEN tag IN ( 'ALTER TABLE', 'DROP TABLE' ) + */ EXECUTE PROCEDURE _object_reference._etg_fix_identity() ; CREATE EVENT TRIGGER zzz_object_reference_capture ON ddl_command_end - -- For debugging - --WHEN tag IN ( 'ALTER TABLE', 'DROP TABLE' ) + /* + * For debugging + * WHEN tag IN ( 'ALTER TABLE', 'DROP TABLE' ) + */ EXECUTE PROCEDURE _object_reference._etg_capture() ; diff --git a/test/dump/load_all.sql b/test/dump/load_all.sql index 5b73421..ff5d522 100644 --- a/test/dump/load_all.sql +++ b/test/dump/load_all.sql @@ -52,8 +52,10 @@ SELECT c.* FROM test_object o, test__create(o) c ORDER BY o.seq ASC; SELECT c.* FROM test_object o, test__register(o) c ORDER BY o.seq DESC; -- Would be nice to randomize... SELECT c.* FROM test_object o, test__verify(o) c ORDER BY o.seq ASC; ---SET client_min_messages = DEBUG; ---\i test/pgxntool/finish.sql +/* + * SET client_min_messages = DEBUG; + * \i test/pgxntool/finish.sql + */ CREATE SCHEMA test_capture_support; SET search_path = test_capture_support, tap, public; diff --git a/test/dump/verify.sql b/test/dump/verify.sql index c074bc4..044f646 100644 --- a/test/dump/verify.sql +++ b/test/dump/verify.sql @@ -55,8 +55,10 @@ SELECT c.* ; --- First verify that object group prevents drop --- (see below too) +/* + * First verify that object group prevents drop + * (see below too) + */ SELECT c.* FROM test_capture_support.test_object o --, test_capture_support.test__drop(o) c @@ -79,8 +81,10 @@ SELECT lives_ok( ) FROM object_group_ids ; --- Drop objects for real this time --- (see above too) +/* + * Drop objects for real this time + * (see above too) + */ SELECT c.* FROM test_capture_support.test_object o , test_capture_support.test__drop(o) c diff --git a/test/helpers/object_table.sql b/test/helpers/object_table.sql index debd69a..e7a8ab1 100644 --- a/test/helpers/object_table.sql +++ b/test/helpers/object_table.sql @@ -143,8 +143,10 @@ INSERT INTO test_prereq VALUES , ($$CREATE FUNCTION "test type out"("test type") RETURNS cstring LANGUAGE 'internal' IMMUTABLE AS 'int2in'$$) ; --- \N is null character --- sql-lint:disable-block prefer-short-type: COPY payload data, not real type references +/* + * \N is null character + * sql-lint:disable-block prefer-short-type: COPY payload data, not real type references + */ COPY test_object(object_type, object_name, secondary, create_command, drop_command) FROM STDIN (DELIMITER '|'); table|test table||%("test column" int)| index|test table test index||%ON "test table"("test column")| diff --git a/test/sql/capture.sql b/test/sql/capture.sql index 2d7c2d2..0f6d712 100644 --- a/test/sql/capture.sql +++ b/test/sql/capture.sql @@ -96,8 +96,10 @@ SELECT is_empty( -- Create SELECT c.* FROM test_object o, test__create(o) c ORDER BY o.seq ASC; --- Manually register an object; make certain it does not show up in group --- NOTE! Other tests depend on this working! +/* + * Manually register an object; make certain it does not show up in group + * NOTE! Other tests depend on this working! + */ SELECT lives_ok( $$CREATE TEMP TABLE ogi__object_id AS SELECT object_reference.object__getsert('table', 'object_group_ids', NULL) AS object_id diff --git a/test/sql/event_trigger.sql b/test/sql/event_trigger.sql index 11e2128..4972e9c 100644 --- a/test/sql/event_trigger.sql +++ b/test/sql/event_trigger.sql @@ -67,8 +67,10 @@ SELECT is( , 'Exactly 1 test view record' ); --- s/column_test/column_filler/g --- Change 1 to 2 in getsert +/* + * s/column_test/column_filler/g + * Change 1 to 2 in getsert + */ SELECT lives_ok( $$CREATE TEMP TABLE column_filler AS SELECT * FROM _object_reference._object_v__for_update('table column', 'table_under_test'::regclass, 2)$$ , $$CREATE TEMP TABLE column_filler AS SELECT * FROM _object_reference._object_v__for_update('table column', 'table_under_test'::regclass, 2)$$ From dd16ab8de71c25bd70e8a483d398e632a8689b0a Mon Sep 17 00:00:00 2001 From: jnasbyupgrade Date: Wed, 12 Aug 2026 16:55:14 -0500 Subject: [PATCH 3/3] Drop dead debug comments instead of reformatting them The "For debugging" / commented-out WHEN clauses and the SET client_min_messages/\i finish.sql and column_test->column_filler sed notes were stale scaffolding, not documentation worth keeping in /* */ form. --- sql/object_reference.sql | 12 ------------ test/dump/load_all.sql | 5 ----- test/sql/event_trigger.sql | 4 ---- 3 files changed, 21 deletions(-) diff --git a/sql/object_reference.sql b/sql/object_reference.sql index f369bae..cbed4f5 100644 --- a/sql/object_reference.sql +++ b/sql/object_reference.sql @@ -1572,26 +1572,14 @@ $$); CREATE EVENT TRIGGER zzz__object_reference_drop ON sql_drop - /* - * For debugging - * WHEN tag IN ( 'ALTER TABLE', 'DROP TABLE' ) - */ EXECUTE PROCEDURE _object_reference._etg_drop() ; CREATE EVENT TRIGGER zzz_object_reference__fix_identity ON ddl_command_end - /* - * For debugging - * WHEN tag IN ( 'ALTER TABLE', 'DROP TABLE' ) - */ EXECUTE PROCEDURE _object_reference._etg_fix_identity() ; CREATE EVENT TRIGGER zzz_object_reference_capture ON ddl_command_end - /* - * For debugging - * WHEN tag IN ( 'ALTER TABLE', 'DROP TABLE' ) - */ EXECUTE PROCEDURE _object_reference._etg_capture() ; diff --git a/test/dump/load_all.sql b/test/dump/load_all.sql index ff5d522..0d9dd26 100644 --- a/test/dump/load_all.sql +++ b/test/dump/load_all.sql @@ -52,11 +52,6 @@ SELECT c.* FROM test_object o, test__create(o) c ORDER BY o.seq ASC; SELECT c.* FROM test_object o, test__register(o) c ORDER BY o.seq DESC; -- Would be nice to randomize... SELECT c.* FROM test_object o, test__verify(o) c ORDER BY o.seq ASC; -/* - * SET client_min_messages = DEBUG; - * \i test/pgxntool/finish.sql - */ - CREATE SCHEMA test_capture_support; SET search_path = test_capture_support, tap, public; diff --git a/test/sql/event_trigger.sql b/test/sql/event_trigger.sql index 4972e9c..ac04f37 100644 --- a/test/sql/event_trigger.sql +++ b/test/sql/event_trigger.sql @@ -67,10 +67,6 @@ SELECT is( , 'Exactly 1 test view record' ); -/* - * s/column_test/column_filler/g - * Change 1 to 2 in getsert - */ SELECT lives_ok( $$CREATE TEMP TABLE column_filler AS SELECT * FROM _object_reference._object_v__for_update('table column', 'table_under_test'::regclass, 2)$$ , $$CREATE TEMP TABLE column_filler AS SELECT * FROM _object_reference._object_v__for_update('table column', 'table_under_test'::regclass, 2)$$