Re: Extensions User Design

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: Extensions User Design
Дата
Msg-id 4A68405A.8080803@archonet.com
обсуждение исходный текст
Ответ на Re: Extensions User Design  (Peter Eisentraut <peter_e@gmx.net>)
Ответы Re: Extensions User Design  (Dimitri Fontaine <dfontaine@hi-media.com>)
Список 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"

Pros:
- 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).

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

--   Richard Huxton  Archonet Ltd


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: Extensions User Design
Следующее
От: Robert Haas
Дата:
Сообщение: Re: extension facility (was: revised hstore patch)