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

Re: Extensions User Design

From: Richard Huxton <dev(at)archonet(dot)com>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org, Dimitri Fontaine <dfontaine(at)hi-media(dot)com>
Subject: Re: Extensions User Design
Date: 2009-07-23 10:50:02
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Peter Eisentraut wrote:

 > Instead of installing an "extension", that is, say, a collection
 > of types and functions provided by a third-party source, I would
 > like to have a mechanism to deploy my own actual database
 > application code.

> On the matter of schemas, I suggest that we consider two ideas that have 
> helped RPM in its early days, when everyone had their own very specific ideas 
> about what should be installed where:
> - file system hierarchy standard
> - relocations

Of course if you have IMPORT from an extension, it's down to the DBA:

INSTALL chinese_calendar;
IMPORT FROM chinese_calendar SECTION (default) INTO SCHEMA pg_extension;
IMPORT FROM chinese_calendar SECTION (year_names) INTO SCHEMA lookups;

INSTALL peter_e_app;
IMPORT FROM peter_e_app SECTION (all) INTO SCHEMA public;

Of course this means two things:
1. Every "extension" has to have its own schema mappings.
2. The application view of the database is a sort of "default extension"

- Namespace collisions begone!
- Anything to help extension upgrades could be re-used for applications 
(and vice-versa)
- Some stuff isn't visible outside the extension *at all*
- You can separate extension installation from usage (good for 
multi-user setups).

- Extra layer of indirection (find my namespace => namespace lookup => 
- Extensions need to list what they export in what sections
- More code required

   Richard Huxton
   Archonet Ltd

In response to


pgsql-hackers by date

Next:From: Robert HaasDate: 2009-07-23 11:08:57
Subject: Re: extension facility (was: revised hstore patch)
Previous:From: Peter EisentrautDate: 2009-07-23 10:33:33
Subject: Re: Extensions User Design

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