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 1p5nua-0006XQ-0V for pgsql-hackers@arkaria.postgresql.org; Thu, 15 Dec 2022 13:04:32 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1p5nuY-0000UD-S2 for pgsql-hackers@arkaria.postgresql.org; Thu, 15 Dec 2022 13:04:30 +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 1p5nuY-0000U4-Fx for pgsql-hackers@lists.postgresql.org; Thu, 15 Dec 2022 13:04:30 +0000 Received: from mail-yw1-x112a.google.com ([2607:f8b0:4864:20::112a]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1p5nuU-0005W3-Qu for pgsql-hackers@postgresql.org; Thu, 15 Dec 2022 13:04:30 +0000 Received: by mail-yw1-x112a.google.com with SMTP id 00721157ae682-417b63464c6so39642287b3.8 for ; Thu, 15 Dec 2022 05:04:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pcorp-us.20210112.gappssmtp.com; s=20210112; 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=jL7C9JcCGQj5YdZgyAJexqPhLC+RhNOq1J/QqJ7/opc=; b=DevOiOqlfTzoTIa4ct4S0lTFmioZAvUq6RdzG6xjEz/SS0VW56YWrWxD0Qjm2n1/C/ kRYiFRN/1eUBI0ZAncrkI0VY3iRb/gXhoG+7+00SQQ18neqZMbFKUxpeRHKKboTC8o9H LDsFqXBlupKGX1LiB2RcS7Ex26L+b35mnS3SWONHAfKo2bb+b0Ul583Do1aJe3HRmrgk 3nM+W4BbVu8vGxuRMBZduZk3S+MyUfjemRioTyUDK4FR9YqZ+RunbzPHdzR4cW+xdEeC MTSyvL2PVQhB4e0Y3mm/wLdEhMyVSCr1hjomkBrwDORQcQuACqvSVJ1yx83Ll3Zg71Bv v8HQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=jL7C9JcCGQj5YdZgyAJexqPhLC+RhNOq1J/QqJ7/opc=; b=iVpvgxQUV1N9Q1SDboUpvuTlv8rZ8igmPJPexW6EeMOUBOkiZflT7ROHgkE/z3rjND Ai1l8Fkh2yHk0WTOe3e7L+I8AEMO2+UQjdzEjC62lS2ejkfhSAZx4UHmehrgPl4mNM66 MjVgKCXPARyYa898LyUL/L+h6c/x44RgN0znfL1g00jdHRpS7bLd7scM0aCseFFu7Xks ymh/e81QBMHcN7pf+Ukwr/TgXq6CB2msehRxZpUaZW/iNNMpNJV6vsLhChaj/R91LgMJ o5dzPzLQH6qHQod+xH5D0jeNfdlXF6MfBPUhIWobR23jXJHUlSLd+W1dYjobkY/sseQi VEcg== X-Gm-Message-State: ANoB5pnJOurWQW/IBNEb8HihmE9JJ57/GWquXMghiQtsDMRae32j58Dh PZFRw71KAWbNrz8L9kEvTm7hj5940vwZ4/tC X-Google-Smtp-Source: AA0mqf5zE0tv+6+i9tjMHxJ9+8PK3EnwotO7iFc5uS9FPYSNmheko+/PFHmB+xT05+ekVf3KnSR1rQ== X-Received: by 2002:a05:7500:4d83:b0:ec:8a55:bd7d with SMTP id kz3-20020a0575004d8300b000ec8a55bd7dmr1904760gab.75.1671109464924; Thu, 15 Dec 2022 05:04:24 -0800 (PST) Received: from F (50-78-240-110-static.hfc.comcastbusiness.net. [50.78.240.110]) by smtp.gmail.com with ESMTPSA id c8-20020ac81108000000b003a826e25bc4sm3393785qtj.64.2022.12.15.05.04.23 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Dec 2022 05:04:24 -0800 (PST) From: "Regina Obe" To: Cc: "'Tom Lane'" , References: <003001d8f4ae$402282c0$c0678840$@pcorp.us> <79300.1668052170@sss.pgh.pa.us> <004501d8f4bf$1213fba0$363bf2e0$@pcorp.us> <175298.1668101858@sss.pgh.pa.us> <004b01d8fef3$752dbf30$5f893d90$@pcorp.us> <20221215085234.rpjzlm7hmsmbanqv@c19> In-Reply-To: <20221215085234.rpjzlm7hmsmbanqv@c19> Subject: RE: Ability to reference other extensions by schema in extension scripts Date: Thu, 15 Dec 2022 08:04:22 -0500 Message-ID: <002001d91085$c10538e0$430faaa0$@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: AQFgXZxpr0yOB+9uS1Xwc1lFBKthIAHDgsBQATMNnPQCHx2JfQJ9+hXQAio5JzGvEl9twA== Content-Language: en-us List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On Tue, Nov 22, 2022 at 11:24:19PM -0500, Regina Obe wrote: > > > Here is first version of my patch using the @extschema:extensionname@ > > syntax you proposed. > > > > This patch includes: > > 1) Changes to replace references of @extschema:extensionname@ with the > > schema of the required extension > > 2) Documentation for the feature > > 3) Tests for the feature. > > > > There is one issue I thought about that is not addressed by this. > > > > If an extension is required by another extension and that required > > extension schema is referenced in the extension scripts using the > > @extschema:extensionname@ syntax, then ideally we should prevent the > > required extension from being relocatable. This would prevent a user > > from accidentally moving the required extension, thus breaking the > > dependent extensions. > > > > I didn't add that feature cause I wasn't sure if it was overstepping > > the bounds of what should be done, or if we leave it up to the user to > > just know better. > > An alternative would be to forbid using @extschema:extensionname@ to > reference relocatable extensions. DBA can toggle relocatability of an extension > to allow it to be referenced. > > --strk; That would be hard to do in a DbaaS setup and not many users know they can fiddle with extension control files. Plus those would get overwritten with upgrades. In my case for example I have postgis_tiger_geocoder that relies on both postgis and fuzzystrmatch. I'd rather not have to explain to users how to fiddle with the fuzzystrmatch.control file to make it not relocatable. But I don't think anyone would mind if it's forced after install because it's a rare thing for people to be moving extensions to different schemas after install. Thanks, Regina