Re: Satisfy extension dependency by one of multiple extensions

From: Yeb Havinga <yebhavinga(at)gmail(dot)com>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: PostgreSQL-development Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Satisfy extension dependency by one of multiple extensions
Date: 2011-09-23 13:30:55
Message-ID: 4E7C8A0F.3030007@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2011-09-23 14:19, Heikki Linnakangas wrote:
> On 23.09.2011 14:56, Yeb Havinga wrote:
>> I have a use case where an extension dependency can be satisfied by one
>> of five other extensions. Currently I'm unable to express that in the
>> extension control file, since the elements from 'requires' are currently
>> searched on exact name match. The attached patch changes this behaviour
>> for list elements that end with a *, into prefix matching, so that e.g.
>> table* matches tablefunc.
>
> That's going to quickly extend into even more complex rules, like "foo
> OR bar", "(foo OR bar) AND (foobar)" etc. IIRC the extension control
> file format was modeled after some other package management system
> (.deb ?). You might want to look at the past discussions when the
> extension control file format was decided.

Ech.. 2364 hits on 'extension' in my mailbox. However I found a thread
'extension dependency checking' that also talks about version numbers
and the 'provides' capability you mention below.
>
> We might want to have a system where an extension can declare that it
> "provides" capabilites, and then have another extension "require"
> those capabilities. That would be a neater solution to the case that
> there are multiple extensions that all provide the same capability.
>

Yes that would be neater. I can't think of anything else however than to
add 'extprovides' to pg_extension, fill it with an explicit 'provides'
from the control file when present, or extname otherwise, and use that
column to check the 'requires' list on extension creation time.

--
Yeb Havinga
http://www.mgrid.net/
Mastering Medical Data

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2011-09-23 13:34:19 Re: [REVIEW] pg_last_xact_insert_timestamp
Previous Message Robert Haas 2011-09-23 13:29:01 Re: new createuser option for replication role