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

From: "Regina Obe" <lr(at)pcorp(dot)us>
To: <strk(at)kbt(dot)io>, "'Mat Arye'" <mat(at)timescaledb(dot)com>
Cc: "'Yurii Rashkovskii'" <yrashk(at)gmail(dot)com>, "'Tom Lane'" <tgl(at)sss(dot)pgh(dot)pa(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-04-28 12:10:00
Message-ID: 001201d979ca$5c2a21c0$147e6540$@pcorp.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>
> > As for Tom's concern about downgrades, I think it's valid but it's a
> > case that is easy to test for in Plpgsql and either handle or error.
> > For example, we use semver so testing for a downgrade at the top of
> > the upgrade script is trivial.
>

I was thinking about this more. The extension model as it stands doesn't
allow an extension author to define version hierarchy. We handle this
internally in our scripts to detect a downgrade attempt and stop it similar
to what Mat is saying.

Most of that is basically converting our version string to a numeric number
which we largely do with a regex pattern.

I was thinking if there were some way to codify that regex pattern in our
control file, then wild cards can only be applied if such a pattern is
defined and the

%--<target version>

The % has to be numerically before the target version.

Thanks,
Regina

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Drouvot, Bertrand 2023-04-28 12:29:13 Re: Autogenerate some wait events code and documentation
Previous Message Robert Haas 2023-04-28 12:06:47 Re: Add PQsendSyncMessage() to libpq