Re: Query on support for trigger functions

From: Mehul Doshi-A20614 <mehul(at)motorola(dot)com>
To: "'Magnus Hagander'" <mha(at)sollentuna(dot)net>, pgsql-hackers-win32(at)postgresql(dot)org
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, Mehul Doshi-A20614 <mehul(at)motorola(dot)com>
Subject: Re: Query on support for trigger functions
Date: 2005-08-01 06:44:16
Message-ID: 45AAAAED8B10F547878F52FE15C57C5D01EB56B7@zin24exm03.corp.mot.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers-win32

Hi,

The depends test.dll showed the same result in both places.
Finally I managed to get a break-through. When I copied the dll into the bin
folder,
it started to work fine. It's like postgres seems to be looking at it's own
directory.

Though not an elegant or a good solution, it seems to work. Once the patch
comes in, I
will revert back to putting the dll in the lib folder.

Thanks & Regards,
Mehul

-----Original Message-----
From: Magnus Hagander [mailto:mha(at)sollentuna(dot)net]
Sent: Thursday, July 28, 2005 1:33 AM
To: Mehul Doshi-A20614; pgsql-hackers-win32(at)postgresql(dot)org
Cc: Bruce Momjian
Subject: RE: [pgsql-hackers-win32] Query on support for trigger functions
defined in a Shared library in Windows

> 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

Browse pgsql-hackers-win32 by date

  From Date Subject
Next Message Michael GUIARD 2005-08-01 07:38:25 retreive record set
Previous Message Bruce Momjian 2005-07-29 13:02:03 Re: patch for win32 dynloader