Re: [PATCH] Allow bare library names for non-superuser LOAD

From: Japin Li <japinli(at)hotmail(dot)com>
To: "cca5507" <cca5507(at)qq(dot)com>
Cc: "pgsql-hackers" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: [PATCH] Allow bare library names for non-superuser LOAD
Date: 2026-09-03 14:17:07
Message-ID: SY7PR01MB10921D6FCB0C8E7BBBF111DD8B6B62@SY7PR01MB10921.ausprd01.prod.outlook.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, 03 Sep 2026 at 21:17, "cca5507" <cca5507(at)qq(dot)com> wrote:
>> According to the documentation [1], this is expected behavior.
>>
>> Non-superusers can only apply LOAD to library files located in $libdir/plugins/ —
>>         the specified filename must begin with exactly that string. 
>
> Yes, I knew that this is the expected behavior, but it's not very convenient for
> non-superusers, right?

Yeah, it's a bit inconvenient.

> Therefore, I would like to propose a patch that allows
> non-superusers to omit the $libdir/plugins/ prefix and let postgres to expand
> it automatically.
>

The $libdir/plugins directory was introduced in commit abc3120e9b2. It
automatically expands for local_shared_libraries, but not for LOAD command.
I'm not sure if that was intentional.

Other than that, it looks good.

> --
> Regards,
> ChangAo Chen

--
Regards,
Japin Li
ChengDu WenWu Information Technology Co., Ltd.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2026-09-03 14:55:05 Re: remove_useless_joins vs. bug #19560
Previous Message Zsolt Parragi 2026-09-03 14:10:45 FOR PORTION OF: BEFORE INSERT triggers can silently drop leftover rows?