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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Regina Obe <r(at)pcorp(dot)us>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org, Sandro Santilli <strk(at)kbt(dot)io>
Subject: Re: [PATCH] Support % wildcard in extension upgrade filenames
Date: 2023-01-09 22:51:49
Message-ID: 55512.1673304709@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I continue to think that this is a fundamentally bad idea. It creates
all sorts of uncertainties about what is a valid update path and what
is not. Restrictions like

+ Such wildcard update
+ scripts will only be used when no explicit path is found from
+ old to target version.

are just band-aids to try to cover up the worst problems.

Have you considered the idea of instead inventing a "\include" facility
for extension scripts? Then, if you want to use one-monster-script
to handle different upgrade cases, you still need one script file for
each supported upgrade step, but those can be one-liners including the
common script file. Plus, such a facility could be of use to people
who want intermediate factorization solutions (that is, some sharing
of code without buying all the way into one-monster-script).

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Nathan Bossart 2023-01-09 22:51:57 Re: allow granting CLUSTER, REFRESH MATERIALIZED VIEW, and REINDEX
Previous Message Dean Rasheed 2023-01-09 22:38:36 Re: [PATCH] random_normal function