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

Re: Extensions support for pg_dump, patch v27

From: Itagaki Takahiro <itagaki(dot)takahiro(at)gmail(dot)com>
To: Dimitri Fontaine <dimitri(at)2ndquadrant(dot)fr>
Cc: PostgreSQL-Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Extensions support for pg_dump, patch v27
Date: 2011-02-01 10:55:57
Message-ID: AANLkTinCo108bb+Q9FOk3ZAUfZMSQo6B=9jVG-s7SXaG@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackers
Hi, the attached is a further cleanup of the latest commit
(1db20cdd36cb1c2cc5ef2210a23b3c09f5058690).

* Accept paths under $PGSHARE during CREATE EXTENSION
"in addition to" normal paths in convert_and_check_filename().
I think we don't have to disallow normal file accesses in the case.
* Rewrite pg_available_extensions() to use materialize mode.
* Add a protection for nested CREATE EXTENSION calls.
* Removed some unneeded changes in the patch:
  - utils/genfile.h (use DIR directly)
  - missing merges from master in guc.c
  - only #include changes in a few files

Comments and documentation would need to be checked native
English speakers. I cannot help you In this area, sorry.

There are last two issues before it goes to ready for committer.

On Mon, Jan 31, 2011 at 19:21, Dimitri Fontaine <dimitri(at)2ndquadrant(dot)fr> wrote:
>> * "relocatable" and "schema" seems to be duplicated options.
> They are not, really.

I'd suggest to remove "relocatable" option if you won't add
additional meanings to the "relocatable but having schema" case.

Or, I'm still not sure why only adminpack is not relocatable.
Is it possible to make all extensions to relocatable and add
"default_schema = pg_catalog" to adminpack for backward-compatibility?

From older mails:
>> * Should we support absolute control file paths?
> Well I don't see no harm in allowing non-core compliant extension
> packaging,

If you want to support absolute paths, you also need to adjust
convert_and_check_filename() because it only allows to read files
in $PGSHARE. So, absolute path support doesn't work actually.
I prefer to remove absolute path support from script option
because absolute paths are just unportable.

-- 
Itagaki Takahiro

Attachment: patch-on-extension.patch
Description: application/octet-stream (40.7 KB)

In response to

Responses

pgsql-hackers by date

Next:From: Dave PageDate: 2011-02-01 11:08:38
Subject: Re: setlocale and gettext in Postgres
Previous:From: Andrew DunstanDate: 2011-02-01 10:45:47
Subject: Re: setlocale and gettext in Postgres

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