| From: | Todd Graham Lewis <tlewis(at)mindspring(dot)net> |
|---|---|
| To: | Mark Hollomon <mhh(at)mindspring(dot)com> |
| Cc: | pgsql-hackers(at)postgresql(dot)org |
| Subject: | Re: [HACKERS] idea for 'module' support |
| Date: | 1999-06-21 01:58:56 |
| Message-ID: | Pine.LNX.4.04.9906202155060.24228-100000@reflections.eng.mindspring.net |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Sun, 20 Jun 1999, Mark Hollomon wrote:
> 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.
>
> What do you think?
Lots of people do this, but you might want to take a look at how we do
this in Dents, just because it's moderately well documented. I did the
initial version inspired by how GTK+ loads new themes, but the basic
idea is the same everywhere: dlopen() an object, resolve symbols in it,
use those symbols to populate a struct filled with function pointers
and whatnot.
You can find docs on how to write Dents modules at:
http://www.dents.org/modules/modules.html
For how we actually do it, look in the source code under "src/*module*".
I personally think that this is a neat idea in general and might be very
nifty for Postgres.
--
Todd Graham Lewis Postmaster, MindSpring Enterprises
tlewis(at)mindspring(dot)net (800) 719-4664, x22804
"There is no spoon."
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Clark Evans | 1999-06-21 02:14:22 | Re: [HACKERS] BSD vs. GPL |
| Previous Message | Mark Hollomon | 1999-06-21 01:40:25 | 6.6 changes? |