Re: Finer Extension dependencies

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Dimitri Fontaine <dimitri(at)2ndquadrant(dot)fr>
Cc: Hitoshi Harada <umi(dot)tanuki(at)gmail(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Finer Extension dependencies
Date: 2012-03-22 19:46:38
Message-ID: 1332445147-sup-8253@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Excerpts from Dimitri Fontaine's message of jue mar 22 15:08:27 -0300 2012:
> Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
> > get_available_versions_for_extension seems to contain a bunch of
> > commented-out lines ...
>
> Damn. Sorry about that. Here's a cleaned-up version of the patch.

Hmm .. feature names should be globally unique, right? If so I think
you're missing an UNIQUE index on the new catalog, covering just the
feature name. You have a two column index (extoid, featurename), so you
could have two different extensions providing the same feature. Is this
okay? If it is, then there is a bit of a bogus code in
get_extension_feature_oids because it says it assumes that "there is
only one row". Now maybe you just want to return the first one found
and that's okay, but in that case the comment is bogus.

I noticed that you've left unspecified whether an extension should have
a "provides" entry for itself or not -- I mean the code adds one if it's
not there. I'm not sure about this, maybe it's okay. But this makes it
impossible for it to say "provides: extname-0.5" and have a dependent
extension fail if it only requires "extname", because that one will be
provided automatically whether extname's author wants it or not.
Again, maybe this is okay.

--
Álvaro Herrera <alvherre(at)commandprompt(dot)com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alex 2012-03-22 21:42:24 Re: Another review of URI for libpq, v7 submission
Previous Message Stephen Frost 2012-03-22 19:45:29 Re: checkpoint patches