Re: [PATCH] Support % wildcard in extension upgrade filenames - Mailing list pgsql-hackers

From Sandro Santilli
Subject Re: [PATCH] Support % wildcard in extension upgrade filenames
Date
Msg-id 20230531171350.txpt7udupfwwg44s@c19
Whole thread Raw
In response to Re: [PATCH] Support % wildcard in extension upgrade filenames  (Przemysław Sztoch <przemyslaw@sztoch.pl>)
List pgsql-hackers
On Thu, May 18, 2023 at 11:14:52PM +0200, Przemysław Sztoch wrote:
> For me, it would be a big help if you could specify a simple from/to range
> as the source version:
> myext--1.0.0-1.9.9--2.0.0.sql
> myext--2.0.0-2.9.9--3.0.0.sql
> myext--3.0.0-3.2.3--3.2.4.sql
> 
> The idea of % wildcard in my opinion is fully contained in the from/to
> range.

Yes, it will be once partial matching is implemented (in its current
state the patch only allows the wildcard to cover the whole version,
not just a portion, but the idea was to move to partial matches too).

> The name "ANY" should also be allowed as the source version.

It is. The only character with a special meaning, in my patch, would
be the "%" character, and would ONLY be special if the extension has
set the wildcard_upgrades directive to "true" in the .control file.

> Some extensions are a collection of CREATE OR REPLACE FUNCTION. All upgrades
> are one and the same SQL file.

Yes, this is the case for PostGIS, and that's why we're looking
forward to addint support for this wildcard.

--strk;



pgsql-hackers by date:

Previous
From: Dagfinn Ilmari Mannsåker
Date:
Subject: Re: generate syscache info automatically
Next
From: Tom Lane
Date:
Subject: Re: Why does pg_bsd_indent need to be installed?