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

Re: [PATCH] Magic block for modules

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Marko Kreen" <markokr(at)gmail(dot)com>
Cc: "Martijn van Oosterhout" <kleptog(at)svana(dot)org>, pgsql-patches(at)postgresql(dot)org
Subject: Re: [PATCH] Magic block for modules
Date: 2006-05-31 15:14:27
Message-ID: 12544.1149088467@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
"Marko Kreen" <markokr(at)gmail(dot)com> writes:
>>> Could you serve this as special docstring instead?  Eg:
>>> PG_MODULE(foomodule)

I have no objection to that, and see no real implementation problem with
it: we just add a "const char *" field to the magic block.  The other
stuff seems too blue-sky, and I'm not even sure that it's the right
direction to proceed in.  Marko seems to be envisioning a future where
an extension module is this binary blob with install/deinstall/etc code
all hardwired into it.  I don't like that a bit.  I think the current
scheme with separate SQL scripts is a *good* thing, because it makes it
a lot easier for users to tweak the SQL definitions, eg, install the
functions into a non-default schema.  Also, I don't have a problem
imagining extension modules that contain no C code, just PL functions
--- so the SQL script needs to be considered the primary piece of the
module, not the shared library.

Is it worth adding a module name to the magic block, or should we just
leave well enough alone?  It's certainly not something foreseen as part
of the purpose of that block.  In the absence of some fairly concrete
ideas what to do with it, I'm probably going to vote keep-it-simple.

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Andrew DunstanDate: 2006-05-31 15:26:49
Subject: Re: Possible TODO item: copy to/from pipe
Previous:From: Andrew DunstanDate: 2006-05-31 15:03:20
Subject: Re: Compile libpq with vc8

pgsql-patches by date

Next:From: Robert TreatDate: 2006-05-31 15:14:54
Subject: Update link for GUI Tools in FAQ
Previous:From: Marko KreenDate: 2006-05-31 14:57:47
Subject: Re: [PATCH] Magic block for modules

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