From: Mattias Kregert <matti@algonet.se>
To: Darren King <darrenk@insightdist.com>
Cc: pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] char types gone.
Date: Tue, 24 Mar 1998 15:35:31 +0100
Message-ID: <3517C4B3.4E0A7393@algonet.se> (raw)
References: <9803232314.AA27808@ceodev>
Darren King wrote:
>
> Would be nice if stuff like that (and the money and geometrics) could be
> compiled in in the same manner that Apache is a basic web server that lets
> you pick and choose modules/features you want to build into it.
>
> I don't know how big of a performance boost it provides in the cache, but
> removing the functions associated with the char types shrank the pg_proc
> table from 906 to 842 entries or a bit over 7%.
>
> Want to shrink it further? Of those remaining 842, _230_ are for the geometric
> types! Throw in 25 more for the cash/money functions. Bloat city if you
> never use these things. Thirty percent could be moved out to contrib and
> not missed by most postgres users.
>
> I think a reasonable goal is to provide an sql server that meets the current sql
> standard with the possibility of having other types and functionality available
> as modules. These modules could be made into the template1 at compile time
> or made and installed on a per-database basis. Make your server and database
> with whatever you want in it.
The problem with the contrib stuff is that most users find it too
difficult to dig around in that dir and make and install stuff. The
"contrib" name also give me the feeling that this is unsupported
stuff/beta/not-to-be-used-in-production/to-be-removed etc.
The nicest thing would be if contrib was changed to "modules", and
everything was compiled and installed in /usr/local/pgsql/modules/.
Then the user could install them by typing "INSMOD ORACLE" and then
/usr/local/pgsql/modules/oracle/insmod.sql would be executed and
install shared libraries and sql commands. "RMMOD ORACLE" would
do the opposite. Just like Linux modules.
Perhaps it would even be possible to autoload modules if the modules
directories contains a file with commands/functions listed, which
would be searched automagically...
This is the idea:
psql-> SET MODULES TO AUTOLOAD;
NOTICE: 100 Modules will now load automagically.
psql-> SELECT MYFUNKYFUNC('hello');
NOTICE: 202 Unknown function 'MYFUNKYFUNC(text)'
NOTICE: 100 Module 'MYFUNCTIONS' loaded.
myfunkyfunc
-------------------
the word is 'hello'
(1 row)
psql-> INSMOD ORACLE;
NOTICE: 100 Module 'ORACLE' loaded.
NOTICE: 110 Module description: Oracle(tm) compatability module. Version
1.0.
psql-> LSMOD;
NOTICE: 100 MYFUNCTIONS ORACLE
psql-> RMMOD VERBOSE MYFUNCTIONS;
NOTICE: 100 Module 'MYFUNCTIONS' removed.
NOTICE: 120 Functions removed: Myfunkyfunc(text) Myotherfunc(int)
Mylastfunc(float)
NOTICE: 120 Commands removed: Myfunkycommand
Is it possible to register commands dynamically in the parser?
/* m */
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: matti@algonet.se, darrenk@insightdist.com
Subject: Re: [HACKERS] char types gone.
In-Reply-To: <3517C4B3.4E0A7393@algonet.se>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox