Skip site navigation (1) Skip section navigation (2)

Re: Finer Extension dependencies

From: Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>
To: Hitoshi Harada <umi(dot)tanuki(at)gmail(dot)com>
Cc: Dimitri Fontaine <dimitri(at)2ndquadrant(dot)fr>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Finer Extension dependencies
Date: 2012-03-22 17:38:29
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers

Again, thanks very much for the review.  Here's an updated patch (just
merged against master) fixing most of your comments here.  I couldn't
reproduce previous problems with the attached:

 - DROP EXTENSION was broken, asking to cascade to self
 - CREATE EXTENSION was bypassing "requires"

I could reproduce the second problem then fix it with the following one
liner. I missed it because my test case still fails for not finding the
cube type rather than the cube extension without this fix:

-	if (!OidIsValid(featoid) && !missing_ok)
+	if (!OidIsValid(*featoid) && !missing_ok)

Thank you all for your patience while I was busy elsewhere, it's
definitely not a show stopper in my book :)

dim=# create extension earthdistance;
ERROR:  feature "cube" is not currently provided
HINT:  Please install an extension that provides it first

dim=# create extension cube;

dim=# create extension earthdistance;

dim=# drop extension cube cascade;
NOTICE:  drop cascades to extension earthdistance

Hitoshi Harada <umi(dot)tanuki(at)gmail(dot)com> writes:
> - There are some mixture of pg_extension_feature and pg_extension_feature"s"


> - The doc says pg_extension_feature"s" has four columns but it's not true.

Well the SGML table describing the catalog has 4 cols :)

> - Line 608 is bad. In the loop, provides_itself is repeatedly changed
> to true and false and I guess that's not what you meant.


> - Line 854+, you can fold two blocks into one.  The two blocks are
> similar and by giving provides list with list_make1 when
> control->provides  == NIL you can do it in one block.


> - s/trak/track/

Fixed, I guess the English would need rephrasing.

> - Line 960, you missed updating classId for dependency.

I don't think so.

Dimitri Fontaine     PostgreSQL : Expertise, Formation et Support

Attachment: extension-provides.v3.patch
Description: text/x-patch (46.8 KB)

In response to


pgsql-hackers by date

Next:From: Pavan DeolaseeDate: 2012-03-22 17:45:02
Subject: Re: HOT updates & REDIRECT line pointers
Previous:From: Tom LaneDate: 2012-03-22 17:19:04
Subject: Re: Re: pg_stat_statements normalisation without invasive changes to the parser (was: Next steps on pg_stat_statements normalisation)

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group