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: 6BCB9D8A16AC4241919521715F4D8BCE094620@algol.sollentuna.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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.

//Magnus

Responses

Browse pgsql-hackers-win32 by date

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