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

From Regina Obe
Subject RE: [PATCH] Support % wildcard in extension upgrade filenames
Date
Msg-id 001201d979ca$5c2a21c0$147e6540$@pcorp.us
Whole thread Raw
In response to Re: [PATCH] Support % wildcard in extension upgrade filenames  (Sandro Santilli <strk@kbt.io>)
List 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




pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Add PQsendSyncMessage() to libpq
Next
From: "Drouvot, Bertrand"
Date:
Subject: Re: Autogenerate some wait events code and documentation