Re: Extensions support for pg_dump, patch v27

From: Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>, Itagaki Takahiro <itagaki(dot)takahiro(at)gmail(dot)com>, "David E(dot) Wheeler" <david(at)kineticode(dot)com>, David Fetter <david(at)fetter(dot)org>, PostgreSQL-Hackers <pgsql-hackers(at)postgresql(dot)org>, Dave Page <dpage(at)postgresql(dot)org>, Guillaume Lelarge <guillaume(at)lelarge(dot)info>
Subject: Re: Extensions support for pg_dump, patch v27
Date: 2011-01-27 11:01:46
Message-ID: 87oc72d2zp.fsf@hi-media-techno.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:
> Oh: then you're doing it wrong. If you want to remember that WITH
> SCHEMA was specified, you need to explicitly store that as another
> column in pg_extension.

Ok, done. Of course, it solves the whole problem Itagaki had with
adminpack because we stop relying on dependencies to get it right now.

I've also added another parameter in the control file, named "schema".
It's only valid to use that when relocatable is false, and it allows to
force the schema where to install the extension. When this schema does
not already exists, it will be created for the user.

Of course the adminpack extension's control file now has relocatable =
false and schema = 'pg_catalog'.

~=# create extension lo;
CREATE EXTENSION
~=# create extension adminpack;
CREATE EXTENSION
~=# \dx
List of extensions
Schema | Name | Version | Description
------------+-----------+----------+-----------------------------------------
pg_catalog | adminpack | 9.1devel | Administrative functions for PostgreSQL
utils | lo | 9.1devel | managing Large Objects
(2 rows)

~=# drop extension adminpack;
DROP EXTENSION
~=# create extension adminpack with schema utils;
ERROR: this extension has to be installed in schema "pg_catalog"
~=# create extension adminpack with schema pg_catalog;
CREATE EXTENSION
~=# alter extension adminpack set schema utils;
ERROR: this extension does not support SET SCHEMA

The documentation is updated both in the patch and here:

http://pgsql.tapoueh.org/extensions/doc/html/extend-extension.html

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

Attachment Content-Type Size
extension.v28.patch.gz application/octet-stream 59.8 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Itagaki Takahiro 2011-01-27 12:02:15 Re: Extensions support for pg_dump, patch v27
Previous Message Alexey Klyukin 2011-01-27 10:38:53 Re: arrays as pl/perl input arguments [PATCH]