> > > 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