Skip site navigation (1) Skip section navigation (2)

Re: [PATCH] Magic block for modules

From: "Marko Kreen" <markokr(at)gmail(dot)com>
To: "Martijn van Oosterhout" <kleptog(at)svana(dot)org>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: [PATCH] Magic block for modules
Date: 2006-05-31 10:08:41
Message-ID: e51f66da0605310308j74942a2arbabc485c1129a37f@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
On 5/8/06, Martijn van Oosterhout <kleptog(at)svana(dot)org> wrote:
> This implements a proposal made last november:
>
> http://archives.postgresql.org/pgsql-hackers/2005-11/msg00578.php

> 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:

PG_MODULE_DESC("Do foo")
PG_MODULE_AUTHOR("FooMan <baz(at)foo>")

This provides more motivation for module authors and also creates
(visually) smooth path to provide automatic install, uninstall and registration:

PG_MODULE_INSTALL(inst_sql)
PG_MODULE_UNINSTALL(uninst_sql)

create module foo from '$libdir/foo';
drop module foo;

This seems like worthwhile direction to move, especially
as it requires pretty small amount of changes.

-- 
marko

In response to

Responses

pgsql-hackers by date

Next:From: Bruce MomjianDate: 2006-05-31 11:02:35
Subject: Re: [HACKERS] psql \copy warning
Previous:From: Bruce MomjianDate: 2006-05-31 09:47:26
Subject: Re: [PATCHES] Magic block for modules

pgsql-patches by date

Next:From: Bruce MomjianDate: 2006-05-31 11:02:35
Subject: Re: [HACKERS] psql \copy warning
Previous:From: Bruce MomjianDate: 2006-05-31 09:33:59
Subject: Re: [PATCH] Add support for GnuTLS

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group