From 63c9b5af992a708fb5d8f259c070f30205f82ad1 Mon Sep 17 00:00:00 2001 From: jnasbyupgrade Date: Sun, 12 Jul 2026 18:29:38 -0500 Subject: [PATCH] Remove redundant client_min_messages handling from install (#2) Also removes the old save/restore of the value into a temp table. CREATE EXTENSION already forces client_min_messages to at least WARNING for the install script (only raising it, so a stricter caller is respected) and restores the caller's value afterward -- it has done so since extensions were introduced in 9.1. The script's own setting was therefore redundant, and being blind it lowered a stricter caller's level during install. Drop it. Co-Authored-By: Claude Opus 4.8 (1M context) --- sql/extension_drop--1.0.0.sql | 7 ------- sql/extension_drop.sql | 7 ------- 2 files changed, 14 deletions(-) diff --git a/sql/extension_drop--1.0.0.sql b/sql/extension_drop--1.0.0.sql index 558d6a4..3fe71e8 100644 --- a/sql/extension_drop--1.0.0.sql +++ b/sql/extension_drop--1.0.0.sql @@ -7,9 +7,6 @@ */ CREATE SCHEMA __extension_drop; -CREATE TABLE __extension_drop.messages AS SELECT pg_catalog.current_setting('client_min_messages'); -SET client_min_messages = WARNING; - CREATE FUNCTION __extension_drop.exec( sql text ) RETURNS void LANGUAGE plpgsql AS $body$ @@ -302,10 +299,6 @@ CREATE EVENT TRIGGER extension_drop /* * Drop "temporary" objects */ -SELECT __extension_drop.exec('SET client_min_messages = ' || current_setting) - FROM __extension_drop.messages -; -DROP TABLE __extension_drop.messages; DROP FUNCTION __extension_drop.create_function( function_name text , args text diff --git a/sql/extension_drop.sql b/sql/extension_drop.sql index d3b549d..75319be 100644 --- a/sql/extension_drop.sql +++ b/sql/extension_drop.sql @@ -6,9 +6,6 @@ */ CREATE SCHEMA __extension_drop; -CREATE TABLE __extension_drop.messages AS SELECT pg_catalog.current_setting('client_min_messages'); -SET client_min_messages = WARNING; - CREATE FUNCTION __extension_drop.exec( sql text ) RETURNS void LANGUAGE plpgsql AS $body$ @@ -301,10 +298,6 @@ CREATE EVENT TRIGGER extension_drop /* * Drop "temporary" objects */ -SELECT __extension_drop.exec('SET client_min_messages = ' || current_setting) - FROM __extension_drop.messages -; -DROP TABLE __extension_drop.messages; DROP FUNCTION __extension_drop.create_function( function_name text , args text