Re: [HACKERS] idea for 'module' support

From: wieck(at)debis(dot)com (Jan Wieck)
To: mhh(at)mindspring(dot)com (Mark Hollomon)
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] idea for 'module' support
Date: 1999-06-21 16:21:43
Message-ID: m10w6pL-0003klC@orion.SAPserv.Hamburg.dsh.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Mark Hollomon wrote:

>
>
> As I've been playing with the PL/Perl implementation, it has dawned on me a
> fairly simple, but nice feature could be added.
>
> I would like to add the following command:
>
> LOAD PACKAGE 'package-name';
>
> Like the current 'LOAD' it would treat 'package-name'
> as shared library. But it would also call an intialization function
> in the library (package_init maybe?).
>
> For instance, a user may type:
>
> LOAD PACKAGE 'plperl';
>
> This would not only load the shared library "plperl.so", but call
> the function "package_init" which could the use the SPI facilities
> to properly setup the system tables for the new language.
>
> New types could be packaged the same way.
>
> This would give a very modular way to add 'packages' of functionality.

1. All the functionality required to install such a package
is only needed once per database (or if thrown into
template1 once per installation). But the entire shared
object has to be linked into each time a backend needs
one single function from it. I'm not sure if it's such a
good idea to waste more and more address space for
administrative stuff that isn't required at runtime.

2. Most of such functionality requires PostgreSQL superuser
rights (like installing C language functions). Thus it is
useless for a regular user.

3. Some of the features might be customizable. Procedural
languages for example can be installed as trusted ones or
not. Trusted languages can be used by any regular user to
CREATE FUNCTION, untrusted ones can't. Placing the
installation procedure inside the module itself doesn't
make things easier here.

Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck(at)debis(dot)com (Jan Wieck) #

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Alan Dorman 1999-06-21 16:30:14 Re: [HACKERS] BSD vs. GPL
Previous Message Jeff Hoffmann 1999-06-21 15:41:09 Re: [HACKERS] has anybody else used r-tree indexes in 6.5?