Re: [PATCH] Support % wildcard in extension upgrade filenames

From: Sandro Santilli <strk(at)kbt(dot)io>
To: Przemysław Sztoch <przemyslaw(at)sztoch(dot)pl>
Cc: Yurii Rashkovskii <yrashk(at)gmail(dot)com>, Eric Ridge <eebbrr(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com>, Regina Obe <lr(at)pcorp(dot)us>, Regina Obe <r(at)pcorp(dot)us>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: [PATCH] Support % wildcard in extension upgrade filenames
Date: 2023-05-31 17:13:50
Message-ID: 20230531171350.txpt7udupfwwg44s@c19
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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;

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2023-05-31 17:21:05 Re: Why does pg_bsd_indent need to be installed?
Previous Message Dagfinn Ilmari Mannsåker 2023-05-31 17:02:57 Re: generate syscache info automatically