Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uM8n1-003Wjz-99 for pgsql-bugs@arkaria.postgresql.org; Mon, 02 Jun 2025 17:17:35 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1uM8mz-00BZpl-S1 for pgsql-bugs@arkaria.postgresql.org; Mon, 02 Jun 2025 17:17:33 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uM8mz-00BZpN-Jl for pgsql-bugs@lists.postgresql.org; Mon, 02 Jun 2025 17:17:33 +0000 Received: from mail-oa1-x2b.google.com ([2001:4860:4864:20::2b]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1uM8mV-0004MD-16 for pgsql-bugs@lists.postgresql.org; Mon, 02 Jun 2025 17:17:33 +0000 Received: by mail-oa1-x2b.google.com with SMTP id 586e51a60fabf-2db9e29d3bcso1966144fac.1 for ; Mon, 02 Jun 2025 10:17:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1748884622; x=1749489422; darn=lists.postgresql.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=qnogjWLRJgOHQb5iG/ya0Cvv5zmwbmyTFSuCYXetPmI=; b=J0ynpR3gsdRt9JTZQs2oCg1uN589yaZ8AEmbJmR7Ed6dIccBG0SLQ+4ET817pghRpS g0rILX6L2b673tZTmBVkxpg8fA5YK3y6fB50cWXISBJwkOt7Iu1XyTZU/HYtmsJ5hcVT n63wqyOSacLRhAwS26xBwqAXfQyi6O9GczZ14iI1VVWnvlMx2WKK8GNUygdftS0sbc1J z1wayX8juduQ/n2q8zyertUMRBGcMo9VoJ+CHYqQm9AjDgcZiJoV5nuK0G+wU706o5kj fZeTAqAPMW/QeLRwTwEYK8LS6RlO3LieeGYhYf/drzn19RaC2Dm55zSpskwO2DntN2hR o6ig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1748884622; x=1749489422; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=qnogjWLRJgOHQb5iG/ya0Cvv5zmwbmyTFSuCYXetPmI=; b=uM6WpZCmv4Yv7K4mZqq9MGvv2jx4DnSi/5/llYV1sSTni3E4cL096Z0DMvcg+Ur7ru iJKSe8OY3wyoG4FNcHoosA8/AVmLcivPxEK1mEYfrQ/YhDgP2YKnWKgbNLN+dqrd4q0M OUWmZZaui/EvrDrcxggxnjxaOpcEhTPgjwSOrBiF8X7eGsvIfzYmifmHg5wR3zqgYtmK vzpNpNUlBOv92wVv4g0R0u9PXHr77kwzZqSJ7I0DM+1XLpiC13V7p+Bct/AHnI1h7Alb Ubcr4sj1xWk7krX0/uC2t36EksykjiBU/pUaJPdDJGv3titMq/iDroHQuURSbOLRBNLG GOUA== X-Forwarded-Encrypted: i=1; AJvYcCWgdFkAG8a0/PLJlDgplRpm7ngOvPg9deOnB8HBiSo2Tfibbk2XJwTtkkpTy6xA4kchja3tKj8lE1r2@lists.postgresql.org X-Gm-Message-State: AOJu0Yyf/NwDHVUDjuvX4e2o5KAnAsczDMVFgOE4T7LnrgUskunVgC3Y e6XYIQ+QI+LttBcpjbk+Br0a44lK1MRs0VCOyvewdj+oTswNIRxtbigy X-Gm-Gg: ASbGncvn+orNQtZkBGt7TNTTbdkq7j7IfH8IScjXJuWh8pTswOYcw2Hz3f9OVWgEejB kjGoINR+FuobGr82EYHcltGf9vaw+QVFaRwSFB0wKRTvXDZQWTPHO3282/6crUVO2LH3C6dtk2S 4Vud2+yEpP7QfOLfc2mh8I+SfgAaOwWdF/49NHs81HD3ncKDXE3/ETvEBKO9HWsg1BGbUmtvRWE DTFB1G1GQbQOuvw6zn5ezAXDsS4oxWDtBbUPPGmhXhUlZa0hgXnNcZNL/gD9b4h9H3H8jKmrhA/ kU6LXmyuWsQMW/PkNxnaS6uCBqh75/gQB2/yExS6idf5PZ+Hd34k1ufqL18QaQi33yRZevBN73k aGViUERtvLHSxWK0vamTeess2QgCTAOr65pPW X-Google-Smtp-Source: AGHT+IEDe82M7nJe06oBk2o3MNZaoAMGr7mGFOdj5rBzbsVkKIlKDSm689gDUVtdqXy4uvWZsjp5ZA== X-Received: by 2002:a05:6871:3606:b0:29e:2bbd:51cb with SMTP id 586e51a60fabf-2e92151d67dmr7981603fac.24.1748884621988; Mon, 02 Jun 2025 10:17:01 -0700 (PDT) Received: from nathan (syn-068-184-213-242.res.spectrum.com. [68.184.213.242]) by smtp.gmail.com with ESMTPSA id 586e51a60fabf-2e931239d5asm1332337fac.25.2025.06.02.10.17.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Jun 2025 10:17:01 -0700 (PDT) Date: Mon, 2 Jun 2025 12:16:59 -0500 From: Nathan Bossart To: Matheus Alcantara Cc: evsi@amazon.com, pgsql-bugs@lists.postgresql.org, peter@eisentraut.org Subject: Re: BUG #18920: LOAD '$libdir/plugins' no longer works in 18beta1 Message-ID: References: <18920-b350b1c0a30af006@postgresql.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, Jun 02, 2025 at 11:05:12AM -0300, Matheus Alcantara wrote: > The problem is how we are sripping the $libdir from module_pathname. I > think that we should still strip the $libdir from module_pathname when > expanding from a .control file, but we should not expand via LOAD > command, since the user may explicitly specify the $libdir prefix as it > is the case here. > > Having this logic on expand_dynamic_library_name() force us to srip the > $libdir for all scenarios, so I think that a better place to have this > is on load_external_function() that is called when executing a SQL > script from an extension. Thanks for the patch. This seems generally reasonable to me. -- nathan