Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pZsxN-0006iv-6a for pgsql-hackers@arkaria.postgresql.org; Wed, 08 Mar 2023 12:31:45 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pZsxL-0008Ln-3G for pgsql-hackers@arkaria.postgresql.org; Wed, 08 Mar 2023 12:31:43 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pZsxK-0008LI-QG for pgsql-hackers@lists.postgresql.org; Wed, 08 Mar 2023 12:31:42 +0000 Received: from relay9-d.mail.gandi.net ([2001:4b98:dc4:8::229]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pZsxI-0000DC-3D for pgsql-hackers@lists.postgresql.org; Wed, 08 Mar 2023 12:31:41 +0000 Received: (Authenticated sender: strk@kbt.io) by mail.gandi.net (Postfix) with ESMTPSA id 92705FF802; Wed, 8 Mar 2023 12:31:34 +0000 (UTC) Date: Wed, 8 Mar 2023 13:32:07 +0100 From: Sandro Santilli Sender: strk@kbt.io To: Tom Lane Cc: Robert Haas , Regina Obe , pgsql-hackers@lists.postgresql.org Subject: Re: [PATCH] Support % wildcard in extension upgrade filenames Message-ID: <20230308123207.cbvozwyicy6gbbxu@c19> References: <20221117095734.igldlk6kngr6ogim@c19> <166914379479.1121.7549798686571352890.pgcf@coridan.postgresql.org> <55512.1673304709@sss.pgh.pa.us> <20230110205259.htcuhg3t7shd367d@c19> <387183.1673394631@sss.pgh.pa.us> <4025573.1678216387@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4025573.1678216387@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, Mar 07, 2023 at 02:13:07PM -0500, Tom Lane wrote: > What I am maintaining is that no extension author is actually going > to write such a script, indeed they probably won't trouble to write > any downgrade-like actions at all. Which makes the proposed design > mostly a foot-gun. What I'm maintaining is that such authors should be warned about the risk, and discouraged from installing any wildcard-containing script UNLESS they deal with downgrade protection. PostGIS does deal with that kind of protection (yes, could be helped somehow in doing that by PostgreSQL). > I'm not unsympathetic to the idea of trying to support multiple upgrade > paths in one script. I just don't like this particular design for that, > because it requires the extension author to make promises that nobody > is actually going to deliver on. Would you be ok with a stricter pattern matching ? Something like: postgis--3.3.%--3.3.ANY.sql postgis--3.3.ANY--3.4.0.sql Would that be easier to promise something about ? --strk;