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 1pbj9t-0008Hp-TD for pgsql-hackers@arkaria.postgresql.org; Mon, 13 Mar 2023 14:28:18 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pbj9s-0001yc-FM for pgsql-hackers@arkaria.postgresql.org; Mon, 13 Mar 2023 14:28:16 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pbj9s-0001yT-2z for pgsql-hackers@lists.postgresql.org; Mon, 13 Mar 2023 14:28:16 +0000 Received: from mail-qv1-xf2e.google.com ([2607:f8b0:4864:20::f2e]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pbj9p-00086a-3w for pgsql-hackers@lists.postgresql.org; Mon, 13 Mar 2023 14:28:15 +0000 Received: by mail-qv1-xf2e.google.com with SMTP id nf5so8295022qvb.5 for ; Mon, 13 Mar 2023 07:28:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pcorp-us.20210112.gappssmtp.com; s=20210112; t=1678717691; 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=7/1NM7SaUSTK8mKbct+jbwdaLboglnD53tHnCKShvyk=; b=XHeNOEQyNfB0oewlZyGQT1IbsxY4+4Co5hVdPD2Hh3ecVp9phPue2woZs2T/UeQTWx iSxjSIZ05X4f/xVFyXoseN1KGXu2z37efNWTULmyytU7BydEm6ceEdmY+1aN3l3q6gBY dOu/MbiJMwGlfE+7+PneepognZ4RsqTB2lwLmaWj1eY44lMpMCcDbf2Alst+0YFAXHIO ncIa/i5BtCbHeqilyTaIQTs87qzYJomkJIaFcF0u870hFll17cAoDxlgbr4Roqsv/j3H N6JiuTu5h3+29uxEso1/MPPgZGWYpzxpj4528KTkYjHwebo58ZyzlF53wWvcpgA4BFi8 iOaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678717691; 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=7/1NM7SaUSTK8mKbct+jbwdaLboglnD53tHnCKShvyk=; b=7fB74extuqxmgOpxFlXfmOYR2r5w6daqaPmmoT5RXo/0pC+fTWrQwhR5QR5OoiyZDI SEFjHcg7M8QDr5IeI2ntrvPAxr+xIvp/sjJRAvZ1AArlthqI2/0tPKn/gpFYJCd9aFos WKL6PtuXthDwMtrH4aV0q/HN0Wfd3F3jTHg/WiUf42X3yATzNjvdi7ta4+q+uHvj0Lfz bGrZ0KWF/jYXOgfjfwZER+Poso3EDOIM5IfyfjanBoQm00GozR7dbleo3q7y4LxXYQJS s+Ic9T1hTXGccxp3K/IgT5w4kSbxoTbyBFciIYgpmk+DsTzwIeJAWWQ3G1125G39b8Fv s1kA== X-Gm-Message-State: AO0yUKXnbLtr+6bZU4B8NGyQ+hie1SDeZlvgqB+1N9a06aKtxrS4R4Io BHufrrjG7GLe2dzlWCyaJTH0eJGF9PeTG5vHZxqSXw== X-Google-Smtp-Source: AK7set9gNYycy46fwrIWWNY5WdyLYY7XFTEOcZx29jhFWc6eEwRqclphWmzr6yXwRQUw/DNdTzJxUQ== X-Received: by 2002:a05:6214:ac2:b0:56b:fafa:9117 with SMTP id g2-20020a0562140ac200b0056bfafa9117mr15347647qvi.25.1678717691410; Mon, 13 Mar 2023 07:28:11 -0700 (PDT) Received: from F (50-78-240-110-static.hfc.comcastbusiness.net. [50.78.240.110]) by smtp.gmail.com with ESMTPSA id b129-20020ae9eb87000000b007425ef4cbc2sm1261985qkg.100.2023.03.13.07.28.10 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 13 Mar 2023 07:28:11 -0700 (PDT) From: "Regina Obe" To: Cc: "'Tom Lane'" , "'Gregory Stark \(as CFM\)'" , , "'Regina Obe'" References: <000401d94bc8$48dff700$da9fe500$@pcorp.us> <167762779361.628976.14009177203307564086.pgcf@coridan.postgresql.org> <005401d95083$26ca24a0$745e6de0$@pcorp.us> <995823.1678478825@sss.pgh.pa.us> <004b01d95394$16123ee0$4236bca0$@pcorp.us> <1012975.1678486476@sss.pgh.pa.us> <005501d953a0$906c4df0$b144e9d0$@pcorp.us> <1019515.1678488437@sss.pgh.pa.us> <001d01d953f2$099b6430$1cd22c90$@pcorp.us> <20230313115916.ivvg4tj54szeu5rj@c19> In-Reply-To: <20230313115916.ivvg4tj54szeu5rj@c19> Subject: RE: Ability to reference other extensions by schema in extension scripts Date: Mon, 13 Mar 2023 10:28:04 -0400 Message-ID: <000601d955b8$068456e0$138d04a0$@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: AQFb3UkpK58iwMTTldDTs6BRw63MSAJahjgRAXVpL3oC133W8wIdikw1AqkAkisBwBvvuQJrBFYcAhn2WrEDIVE3ogJhu78/rzoAQ/A= Content-Language: en-us List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > I've given a try to this patch. It builds and regresses fine. > > My own tests also worked fine. As long as ext1 was found in the ext2's > no_relocate list it could not be relocated, and proper error message is given > to user trying it. > > Nitpicking, there are a few things that are weird to me: > > 1) I don't get any error/warning if I put an arbitrary string into no_relocate > (there's no check to verify the no_relocate is a subset of the requires). > I thought about that and decided it wasn't worth checking for. If an extension author puts in an extension not in requires it's on them as the docs say it should be in requires. It will just pretend that extension is not listed in no_relocate. > 2) An extension can still reference extensions it depends on without putting > them in no_relocate. This may be intentional, as some substitutions may not > require blocking relocation, but felt inconsistent with the normal > @extschema@ which is never replaced unless an extension is marked as non- > relocatable. > > --strk; > > Libre GIS consultant/developer > https://strk.kbt.io/services.html Yes this is intentional. As Tom mentioned, if for example an extension author decides To schema qualify @extschema:foo@ in their table definition, and they marked as requiring foo since such a reference is captured by a schema move, there is no need for them to prevent relocate of the foo extension (assuming foo was relocatable to begin with)