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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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 Content-Type Size
patch-on-extension.patch application/octet-stream 40.7 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dave Page 2011-02-01 11:08:38 Re: setlocale and gettext in Postgres
Previous Message Andrew Dunstan 2011-02-01 10:45:47 Re: setlocale and gettext in Postgres