> On Nov 30, 2026, at 23:05, Peter Eisentraut <[email protected]> wrote: > > On 16.11.26 17:40, Matheus Alcantara wrote: >> I think that is mostly for back-patching. Turning into an error would >> make a server to not start after a minor release upgrade. Querying >> pg_available_extensions would also break after the upgrade with an >> empty path element. >> Ideally I also think that raising an error would be better, but this >> back-patching issue got me, and having different behaviors across >> different versions also seems confusing to me, but I might being to >> conservative here. >> (Thinking while writing this, and not being too conservative, perhaps we can >> consider to ignore empty path elements for back-patching and change master >> to raise an error since the with extension_control_path = '$system:' is an >> invalid syntax.). > > I think that would be a good solution. > > The backpatched versions could raise a warning instead of an error, so that > (1) the patches are structured similarly, and (2) users of those versions get > told that they are making a mistake and they should fix their setting. >
Hi Peter, Thank you very much for the advice. I’ve updated the patch to v7 following your suggestion. In summary, the behavior on master is: * Empty and relative path elements are rejected when the path is used. * An entirely empty string is still interpreted as "$system". * When checking for an extension to provide an unknown-language hint, empty and relative path elements generate warnings and are skipped. The original unknown-language error is preserved, and a hint can still be provided using the remaining directories. For the v18 backpatch, the main changes are the same, but empty and relative path elements are ignored with a warning. Best regards, -- Chao Li (Evan) HighGo Software Co., Ltd. https://www.highgo.com/
v7-0001-Reject-empty-elements-in-extension_control_path.patch
Description: Binary data
v7-0002-Reject-relative-elements-in-extension_control_pat.patch
Description: Binary data
v7-REL-18-0001-Warn-about-empty-elements-in-extension_con.patch.nocfbot
Description: Binary data
v7-REL-18-0002-Warn-about-relative-elements-in-extension_.patch.nocfbot
Description: Binary data
