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: m23990tu22.fsf@2ndQuadrant.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

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;
CREATE EXTENSION

dim=# create extension earthdistance;
CREATE EXTENSION

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

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

Fixed.

> - 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.

Fixed.

> - 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.

Fixed.

> - s/trak/track/

Fixed, I guess the English would need rephrasing.

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

I don't think so.

Regards,
--
Dimitri Fontaine
http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support

Attachment Content-Type Size
extension-provides.v3.patch text/x-patch 46.8 KB

In response to

Responses

Browse pgsql-hackers by date

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