Satisfy extension dependency by one of multiple extensions

Yeb Havinga <yebhavinga@gmail.com>

From: Yeb Havinga <yebhavinga@gmail.com>
To: PostgreSQL-development Hackers <pgsql-hackers@postgresql.org>
Date: 2011-09-23T11:56:36Z
Lists: pgsql-hackers

Attachments

Hello list,

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.

This allows me to specify in a controlfile

requires 'vocab*'

which is satisfied by having either one of the following extensions loaded:

vocab2005
vocab2006
vocab2008
vocab2009
vocab2010

thoughts?

regards,
Yeb Havinga

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