Re: [PATCH] Magic block for modules - Mailing list pgsql-patches

From Martijn van Oosterhout
Subject Re: [PATCH] Magic block for modules
Date
Msg-id 20060531110411.GF23169@svana.org
Whole thread Raw
In response to Re: [PATCH] Magic block for modules  ("Marko Kreen" <markokr@gmail.com>)
Responses Re: [PATCH] Magic block for modules
List pgsql-patches
On Wed, May 31, 2006 at 01:08:41PM +0300, Marko Kreen wrote:
> On 5/8/06, Martijn van Oosterhout <kleptog@svana.org> wrote:
> >All it requires is to include the header "pgmagic.h" and to put
> >somewhere in their source:
> >
> >PG_MODULE_MAGIC
>
> Could you serve this as special docstring instead?  Eg:
>
> PG_MODULE(foomodule)
>
> is mandatory, there you can to your magic, and optional:

<snip>

I like it, but I'm not sure there's enough consensus for that. I've
suggested before including install info inside the modules themselves
but there doesn't seem to be much interest in that.

Apart from that there's issues with implementation. The Linux kernel
can do it easily because it knows it will be using ELF, thus can use
sections to store this info. Postgresql has to support many more types,
making things like this tricky (but not impossible).

Personally I'd like postgres to move to a system where external modules
can easily be installed, uninstalled and upgraded. However, I've not
seen the demand yet.

Have a nice day
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

Attachment

pgsql-patches by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] psql \copy warning
Next
From: Bruce Momjian
Date:
Subject: Re: psql strings and ''