Re: Extensions support for pg_dump, patch v27 - Mailing list pgsql-hackers

From Dimitri Fontaine
Subject Re: Extensions support for pg_dump, patch v27
Date
Msg-id 87oc72d2zp.fsf@hi-media-techno.com
Whole thread Raw
In response to Re: Extensions support for pg_dump, patch v27  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Extensions support for pg_dump, patch v27  (Itagaki Takahiro <itagaki.takahiro@gmail.com>)
List pgsql-hackers
Tom Lane <tgl@sss.pgh.pa.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

pgsql-hackers by date:

Previous
From: Boszormenyi Zoltan
Date:
Subject: make -j2 error in ecpg/pgtypeslib in current GIT
Next
From: Robert Haas
Date:
Subject: Re: [RRR] Seeking Mentors for Funded Reviewers