Re: PG_MODULE_MAGIC check in 8.2 - Mailing list pgsql-general

From Shelby Cain
Subject Re: PG_MODULE_MAGIC check in 8.2
Date
Msg-id 20061115002905.53781.qmail@web55402.mail.re4.yahoo.com
Whole thread Raw
In response to PG_MODULE_MAGIC check in 8.2  (Shelby Cain <alyandon@yahoo.com>)
Responses Re: PG_MODULE_MAGIC check in 8.2
Re: PG_MODULE_MAGIC check in 8.2
List pgsql-general
You are assuming I have the source for the library and although I've asked nicely via email Microsoft hasn't responded
tomy requests for the source code to kernel32.dll.  ;) 

Regardless, even if I had the source, adding PG_MODULE_MAGIC to an arbitrary dll that has no need to know anything
aboutthe internals of Postgresql comes at a cost of much more than a one line to the source.  It requires having all
therandom bits of developer headers/libraries/etc from Postgresql which has been been properly set up to work with my
particularcompiler environment.  In this case, my initial attempts to wrap the functions in a shared library that I can
controlusing the headers supplied with the beta3 installer have met with little success under cygwin using -mno-cygwin
(which,in theory, should invoke mingw) and MSVC due to strange desires to include things like strings.h, libintl.h and
variousother files that don't exist. 

I have an 8.1 database that has a few functions that utilize of a couple of api calls to kernel32 and another library.
I'djust like to get it working under 8.2 with minimal hassle and I'll work out the long term solution of writing a
propermodule that wraps the calls later.  Since I am familiar with building Postgresql from source that is something
I'dmuch rather do after removing the check for a short-term solution. 

Regards,

Shelby Cain

----- Original Message ----
From: Martijn van Oosterhout <kleptog@svana.org>
To: Shelby Cain <alyandon@yahoo.com>
Cc: pgsql-general <pgsql-general@postgresql.org>
Sent: Tuesday, November 14, 2006 5:23:58 PM
Subject: Re: [GENERAL] PG_MODULE_MAGIC check in 8.2

On Tue, Nov 14, 2006 at 02:46:41PM -0800, Shelby Cain wrote:
> Could someone give me some general hints as to what modifications I'd
> need to make in the 8.2 source tree in order to remove the
> PG_MODULE_MAGIC requirement for loading shared libraries into the
> backend?  Is there any chance this could be made into a configurable
> option so the user can choose the desired behavior?

Why? It's a one line addition to the source of the module, much less
work than trying to disable the check in the backend...

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.






pgsql-general by date:

Previous
From: "Raymond O'Donnell"
Date:
Subject: RE : Re: database design ...
Next
From: Desmond Coughlan
Date:
Subject: RE : Re: database design ...