Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1psMvU-0003SN-K1 for pgsql-hackers@arkaria.postgresql.org; Fri, 28 Apr 2023 12:10:12 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1psMvT-0001lX-FK for pgsql-hackers@arkaria.postgresql.org; Fri, 28 Apr 2023 12:10:11 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1psMvT-0001lO-03 for pgsql-hackers@lists.postgresql.org; Fri, 28 Apr 2023 12:10:11 +0000 Received: from mail-qt1-x82c.google.com ([2607:f8b0:4864:20::82c]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1psMvQ-002LrL-6a for pgsql-hackers@lists.postgresql.org; Fri, 28 Apr 2023 12:10:09 +0000 Received: by mail-qt1-x82c.google.com with SMTP id d75a77b69052e-3ef32014101so97490361cf.3 for ; Fri, 28 Apr 2023 05:10:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pcorp-us.20221208.gappssmtp.com; s=20221208; t=1682683806; x=1685275806; h=content-language:thread-index:content-transfer-encoding :mime-version:message-id:date:subject:in-reply-to:references:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=rM1xPE/NJRv/UerDnf6Q+SKtFoR1n+1TJuQyAU7kyPU=; b=0TDp8PvwUTBORtmy+anP34RQ/kXIozT1jrkjOSywuM8vVhcz+qTx8rBC7nyOP3++iX ALZWxvjtPGMjl4OIIsEwd+HMmXJ3wvu7owPNKG218HDGb/0IMIHLmMIiabEO0y1ovR3k VkMfqNq2NU2a/pfbvdHZ8trM/HLmr8EchqdjxmUDVTUfFbwhOecIer5CvYAFkHh7g2MD GhPoUfcJVtCVlzlBb/VpPoRNq7A2YXlV2p3mWg/rkOpzqKVYU3gnhJEol/6s873rs9aT AEO2fED0l/WnilcMte+AkfNxXmHRe/FN5jrLV3ABcxPxLU+bZ1Gh1hSzKAkjeOIJSVbJ 5QSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682683806; x=1685275806; h=content-language:thread-index:content-transfer-encoding :mime-version:message-id:date:subject:in-reply-to:references:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=rM1xPE/NJRv/UerDnf6Q+SKtFoR1n+1TJuQyAU7kyPU=; b=Cmn6TXGVw9OSp+9F5/PyjjNXG8/YDl3gB9MxRg54mfZoJdNHphomk5pfP/+FNq6qPw JCFjie7Z5MrXUMQZhHNGxfoemWZCOT9vqQzxuGODoLLl48KN71mhSgAPZ+hvGMygIOMw yklF3zi4VD55iwgF0muC5+QACL7WXXLt7tyw4hT1/Dk6e6qRcVBG7uKhJmDQHcwC6zRa jMgTm3JFgIlEQHp74ZfYZyJjfA/GVC5GNACG/xkTzdVRBG8v/ceYgMjjihiC5Jof9eEG 6C1HGANrnkNmiu1dSYu3LOPjKEWuGOmBQaFUOXSBaRcENQJOzFIiNUCsQf0gK0BxbDYd 8oeA== X-Gm-Message-State: AC+VfDxDI+NqHa1TstJ3WdDQTK7SP2Ixa/cZFblMdkMdIhZgk2fz157M SJ3kCKocEVbuiRRr4LJc2sSEDQ== X-Google-Smtp-Source: ACHHUZ4hM6RmiTfbO/fkX3YJ1zBoGJQUhAEWoRVBfuXAX/Nq2qnLyfsoET74JYmf9ul5tPzsPIWnZg== X-Received: by 2002:ac8:5acd:0:b0:3ef:3510:7c40 with SMTP id d13-20020ac85acd000000b003ef35107c40mr8142793qtd.65.1682683806091; Fri, 28 Apr 2023 05:10:06 -0700 (PDT) Received: from F (50-78-240-110-static.hfc.comcastbusiness.net. [50.78.240.110]) by smtp.gmail.com with ESMTPSA id ga21-20020a05622a591500b003e4f1b3ce43sm6033523qtb.50.2023.04.28.05.10.05 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 28 Apr 2023 05:10:05 -0700 (PDT) From: "Regina Obe" To: , "'Mat Arye'" Cc: "'Yurii Rashkovskii'" , "'Tom Lane'" , "'Regina Obe'" , References: <166914379479.1121.7549798686571352890.pgcf@coridan.postgresql.org> <55512.1673304709@sss.pgh.pa.us> <20230409204629.sf4fptx672iehcau@c19> <000501d96c23$0f05bdf0$2d1139d0$@pcorp.us> <20230411184823.s3cctaf63qvfeqlj@c19> <006201d96cb5$3d23b150$b76b13f0$@pcorp.us> <20230411212737.phtzffycglbdhmpx@c19> <002201d96e57$e50461a0$af0d24e0$@pcorp.us> <20230427104957.knkkt3klh5uabzke@c19> In-Reply-To: <20230427104957.knkkt3klh5uabzke@c19> Subject: RE: [PATCH] Support % wildcard in extension upgrade filenames Date: Fri, 28 Apr 2023 08:10:00 -0400 Message-ID: <001201d979ca$5c2a21c0$147e6540$@pcorp.us> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 15.0 Thread-Index: AQFbcZ7/grqD0vV/EmaJv8lLJWaGegMCsC7JAZ9uEBECbwDxTgKlQDfPAYNb38QC93uYewJX2puLASlKzDAB1ZCGvAEnViIPr5c1l9A= Content-Language: en-us List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > > > 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 %-- The % has to be numerically before the target version. Thanks, Regina