public inbox for [email protected]  
help / color / mirror / Atom feed
From: Regina Obe <[email protected]>
To: [email protected]
To: 'Mat Arye' <[email protected]>
Cc: 'Yurii Rashkovskii' <[email protected]>
Cc: 'Tom Lane' <[email protected]>
Cc: 'Regina Obe' <[email protected]>
Cc: [email protected]
Subject: RE: [PATCH] Support % wildcard in extension upgrade filenames
Date: Fri, 28 Apr 2023 08:10:00 -0400
Message-ID: <[email protected]> (raw)
In-Reply-To: <20230427104957.knkkt3klh5uabzke@c19>
References: <166914379479.1121.7549798686571352890.pgcf@coridan.postgresql.org>
	<[email protected]>
	<CA+RLCQwWpMuKtqg7eBOjvzpJc-hE708WpHG2=z5B969xncQS3w@mail.gmail.com>
	<20230409204629.sf4fptx672iehcau@c19>
	<[email protected]>
	<20230411184823.s3cctaf63qvfeqlj@c19>
	<[email protected]>
	<20230411212737.phtzffycglbdhmpx@c19>
	<[email protected]>
	<CADsUR0AfzAcSEL4z4NzjQ2Kp16LXQx=dCc0oVvZuS_C_iNW1nQ@mail.gmail.com>
	<20230427104957.knkkt3klh5uabzke@c19>

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







view thread (2+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
  Subject: RE: [PATCH] Support % wildcard in extension upgrade filenames
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox