Thread: PG 13 trusted extensions and pg_available_extensions

PG 13 trusted extensions and pg_available_extensions

From
"Daniel Westermann (DWE)"
Date:
Hi,

I was playing a bit with trusted extensions and wondered if there is a reason that the "trusted" flag is not exposed in
pg_available_extensions. 
I believe that information would be quite useful so one can easily identify extensions that can be installed as
"normal"user. 

Regards
Daniel






Re: PG 13 trusted extensions and pg_available_extensions

From
Michael Paquier
Date:
On Wed, Sep 23, 2020 at 03:28:45PM +0000, Daniel Westermann (DWE) wrote:
> I was playing a bit with trusted extensions and wondered if there is
> a reason that the "trusted" flag is not exposed in pg_available_extensions.
> I believe that information would be quite useful so one can easily
> identify extensions that can be installed as "normal" user.

Adding the trusted flag makes sense for visibility.  There is a bit
more that we could consider though?  For example, what about
"relocatable" and "requires"?
--
Michael

Attachment

Re: PG 13 trusted extensions and pg_available_extensions

From
Julien Rouhaud
Date:
On Thu, Sep 24, 2020 at 10:58 AM Michael Paquier <michael@paquier.xyz> wrote:
>
> On Wed, Sep 23, 2020 at 03:28:45PM +0000, Daniel Westermann (DWE) wrote:
> > I was playing a bit with trusted extensions and wondered if there is
> > a reason that the "trusted" flag is not exposed in pg_available_extensions.
> > I believe that information would be quite useful so one can easily
> > identify extensions that can be installed as "normal" user.
>
> Adding the trusted flag makes sense for visibility.  There is a bit
> more that we could consider though?  For example, what about
> "relocatable" and "requires"?

+1, and also the schema (for non relocatable extensions).



Re: PG 13 trusted extensions and pg_available_extensions

From
"Daniel Westermann (DWE)"
Date:
On Thu, Sep 24, 2020 at 10:58 AM Michael Paquier <michael@paquier.xyz> wrote:
>>
>> On Wed, Sep 23, 2020 at 03:28:45PM +0000, Daniel Westermann (DWE) wrote:
>> > I was playing a bit with trusted extensions and wondered if there is
>> > a reason that the "trusted" flag is not exposed in pg_available_extensions.
>> > I believe that information would be quite useful so one can easily
>> > identify extensions that can be installed as "normal" user.
>>
>> Adding the trusted flag makes sense for visibility.  There is a bit
>> more that we could consider though?  For example, what about
>> "relocatable" and "requires"?

>+1, and also the schema (for non relocatable extensions).

+1


Re: PG 13 trusted extensions and pg_available_extensions

From
Julien Rouhaud
Date:
On Fri, Sep 25, 2020 at 2:51 PM Daniel Westermann (DWE)
<daniel.westermann@dbi-services.com> wrote:
>
> On Thu, Sep 24, 2020 at 10:58 AM Michael Paquier <michael@paquier.xyz> wrote:
> >>
> >> On Wed, Sep 23, 2020 at 03:28:45PM +0000, Daniel Westermann (DWE) wrote:
> >> > I was playing a bit with trusted extensions and wondered if there is
> >> > a reason that the "trusted" flag is not exposed in pg_available_extensions.
> >> > I believe that information would be quite useful so one can easily
> >> > identify extensions that can be installed as "normal" user.
> >>
> >> Adding the trusted flag makes sense for visibility.  There is a bit
> >> more that we could consider though?  For example, what about
> >> "relocatable" and "requires"?
>
> >+1, and also the schema (for non relocatable extensions).

So, apparently pg_available_extension_versions already had those
fields so all the required infrastructure was already there.  I just
added the exact same fields to pg_available_extensions, see attached
patch.

Attachment

Re: PG 13 trusted extensions and pg_available_extensions

From
Tom Lane
Date:
Julien Rouhaud <rjuju123@gmail.com> writes:
> So, apparently pg_available_extension_versions already had those
> fields so all the required infrastructure was already there.  I just
> added the exact same fields to pg_available_extensions, see attached
> patch.

The reason that pg_available_extensions has only the fields it has
is that these other values are potentially extension-version-dependent.
I do not think we can accept this patch.

(Strictly speaking, the "comment" might be version-specific too, but
there's less chance of printing a critically misleading value there.)

            regards, tom lane



Re: PG 13 trusted extensions and pg_available_extensions

From
Julien Rouhaud
Date:
On Sat, Sep 26, 2020 at 10:11 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> Julien Rouhaud <rjuju123@gmail.com> writes:
> > So, apparently pg_available_extension_versions already had those
> > fields so all the required infrastructure was already there.  I just
> > added the exact same fields to pg_available_extensions, see attached
> > patch.
>
> The reason that pg_available_extensions has only the fields it has
> is that these other values are potentially extension-version-dependent.
> I do not think we can accept this patch.

Oh, I didn't know there could be multiple control files per extension,
and I missed the "aux" reference.  So indeed this patch is
unacceptable.