Re: modules - Mailing list pgsql-hackers

From Martijn van Oosterhout
Subject Re: modules
Date
Msg-id 20080405114120.GA17265@svana.org
Whole thread Raw
In response to Re: modules  (Aidan Van Dyk <aidan@highrise.ca>)
Responses Re: modules  ("Tom Dunstan" <pgsql@tomd.cc>)
List pgsql-hackers
On Fri, Apr 04, 2008 at 08:22:51PM -0400, Aidan Van Dyk wrote:
> Today was the first time I actually ever looked at the create function
> and create language code, and I'm actually suprised at how little
> "contract" there seems to be between a object file and the created
> function.  But since it's always been guarded by super-user, it's
> obviously not been an issue...

There was once a discussion about allowing people to add declarations
to the C code indicating the types and returns type to avoid stupid
errors (you could just say CREATE FUNCTION foo FROM module.so and it
would get the types/volitility/etc from the module).

It even went so far that you could build the install/deinstall scripts
into the module itself, so all postgres had to do was dlopen() the
module it could access the install script. It fails due to the fact
that modules that don't require compilation are left out in the cold...

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Please line up in a tree and maintain the heap invariant while
> boarding. Thank you for flying nlogn airlines.

pgsql-hackers by date:

Previous
From: Gregory Stark
Date:
Subject: Re: modules
Next
From: "Tom Dunstan"
Date:
Subject: Re: modules