Re: Extensions, patch v16

From: "David E(dot) Wheeler" <david(at)kineticode(dot)com>
To: Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Extensions, patch v16
Date: 2010-12-09 21:43:03
Message-ID: C1D0FD26-219C-4873-9ED8-4958E7AD7688@kineticode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Dec 9, 2010, at 12:34 PM, Dimitri Fontaine wrote:

> - add support for 'relocatable' boolean property in the control file,
> as discussed on list
>
> this controls what happens at create extension time, by doing a
> relocation of the extension objects when the extension is relocatable
> and the asked schema isn't the first of the search_path (you can't
> relocate an object to a schema where it already is)
>
> when the extension is not relocatable, the mechanism used is the
> @extschema@ replacement in the script so that the user still has a
> say, but at create time only

This still isn't ideal, but I think it's a big improvement. Thanks.

> - nothing is done for the psql commands \dx and \dx+, here's an idea:
>
> \dx lists only installed extensions
> \dx+ <extension> lists the objects, calling pg_extension_objects()
> \dX lists available extensions (and installed too)

+1 I think that's much more like existing psql commands.

> - we still depend on extension authors providing a control file. Do we
> want to spend some efforts on trying to get rid of this file? I know
> David desperately want to, but that's at the cost of making it much
> harder to manage more than one extension in a single directory, for
> once, and the Makefile mechanisms to make than happen (include a rule
> depending on the presence of some variables, keep track of it for the
> cleaning, etc) doesn't seem to me to worth it.

I don't think it makes it any harder to manage multiple extension in a single directory because one can create the control file explicitly (or perhaps rely on .control.in for that), just as they do now. Everyone else can do less work.

So:

* If $extension.control.in exists, use that
* If it doesn't, generate $extension.control from the Makefile variables
* Always remove $extension.control in the `clean` targets

Best,

David

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dmitriy Igrishin 2010-12-09 22:10:10 Fwd: Extended query protocol and exact types matches.
Previous Message Andrew Dunstan 2010-12-09 21:14:48 Re: initdb failure with Postgres 8.4.4