[PATCH] doc: Fix description of relative extension "directory" setting

From: Mahendrakar Srinivasarao <mahendrakarforpg(at)gmail(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Cc: peter(at)eisentraut(dot)org, mths(dot)dev(at)pm(dot)me
Subject: [PATCH] doc: Fix description of relative extension "directory" setting
Date: 2026-10-31 03:47:29
Message-ID: CABkiuWpGiLzDg4D8zRBJ6DHnwYgHqkFxz2gDstXgeOdzh6bdZQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

Since PostgreSQL 18 (commit 81eaaa2c41d), the documentation of the
extension control file "directory" parameter says a relative path is
"relative to the directory where the control file was found".
However, that doesn't match the code: a relative path is resolved
against SHAREDIR,
or against the extension_control_path element in which the control
file was found, i.e. the parent of that "extension" directory.

Repro steps on master:

/tmp/repro/extension/dir_doc_probe.control:
default_version = '1.0'
directory = 'scripts'
relocatable = true

/tmp/repro/scripts/dir_doc_probe--1.0.sql:
CREATE TABLE dir_doc_probe_result (origin text);
INSERT INTO dir_doc_probe_result VALUES ('installation base');

/tmp/repro/extension/scripts/dir_doc_probe--1.0.sql:
CREATE TABLE dir_doc_probe_result (origin text);
INSERT INTO dir_doc_probe_result VALUES ('control-file directory');

BEGIN;
SET LOCAL extension_control_path = '/tmp/repro';
CREATE EXTENSION dir_doc_probe;
SELECT origin FROM dir_doc_probe_result;
origin
-------------------
installation base
(1 row)
ROLLBACK;

The attached patch restores the pre-18 wording, extended to cover
extension_control_path, and clarifies the extension_control_path
description accordingly.

Attachment Content-Type Size
0001-doc-Fix-description-of-relative-extension-directory.patch application/octet-stream 3.0 KB

Browse pgsql-hackers by date

  From Date Subject
Next Message shihao zhong 2026-10-31 04:11:17 Re: Fix BRIN numeric_minmax_multi_ops out of range value range merging
Previous Message Tom Lane 2026-10-31 03:41:32 Re: [PG19] Bogus errors for polymorphic plpython functions