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

Re: Query on support for trigger functions defined in a Shared library in Windows

From: "Magnus Hagander" <mha(at)sollentuna(dot)net>
To: "Mehul Doshi-A20614" <mehul(at)motorola(dot)com>,<pgsql-hackers-win32(at)postgresql(dot)org>
Cc: "Bruce Momjian" <pgman(at)candle(dot)pha(dot)pa(dot)us>
Subject: Re: Query on support for trigger functions defined in a Shared library in Windows
Date: 2005-07-27 20:02:54
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers-win32
> Hi Magnus,
> Thanks. That helped me. I used MingW to compile the code. I 
> still used 8.0.0 because it is the version that we are 
> currently working on. I will migrate to 8.0.3 once I am Able 
> to validate the entire setup.
> I did get another problem, if you could help me out, it would 
> be great.
> Problem Description:
> 1) I generated the dll using the code.
> 2) Added the following in postgresql.conf: 
> dynamic_library_path = 'C:\test\lib,$libdir' 
> The above didn't work so I went ahead and copied the dll into 
> C:\Program Files\PostgreSQL\8.0\lib\
> 3) I restarted the postmaster both times. I got this error both times.
> :25: ERROR:  could not load library "C:/Program
> Files/PostgreSQL/8.0/lib/testtrigfuncs.dll": dynamic load error

Yes. We really need to look at fixing that error message. I had
forgotten it completely :-(

Bruce, you think we can sneak that in after feature freeze? I would call
it a bugfix :-) I haven't looked at what it'd take, but it shouldn't be
*too* hard I think...
If so, please stick it on the TODO so it's not forgotten again.

> However, when I ran the newly compiled postgres code (along 
> with my test dll in /usr/local/pgsql/lib) via msys. It didn't 
> give me any such errors and everything worked out fine. I 
> don't know what I need to do to make this dll which I built 
> run with the already installed version of PostgreSQL (8.0.0).

This sounds a lot like a PATH issue. Try running "depends test.dll" both
from within msys and from the command shell. It's quite likely it will
show up as one or more DLLs not loading in one case.

> I can upgrade it to 8.0.3 if it solves the problem.

I doubt it would - AFAIK there has been no changes in these areas. 



pgsql-hackers-win32 by date

Next:From: Audrey Bergeron-MorinDate: 2005-07-27 20:03:44
Subject: Can't connect after restart
Previous:From: Mehul Doshi-A20614Date: 2005-07-27 13:35:28
Subject: Re: Query on support for trigger functions

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