Re: [bug fix or improvement?] Correctly place DLLs for ECPG apps in bin folder - Mailing list pgsql-hackers

From Asif Naeem
Subject Re: [bug fix or improvement?] Correctly place DLLs for ECPG apps in bin folder
Date
Msg-id CAEB4t-Nj=3OFQQE4ZTk0biy9EJgybKPGFFLLusmSycTHj7-pzA@mail.gmail.com
Whole thread Raw
In response to Re: [bug fix or improvement?] Correctly place DLLs for ECPG apps in bin folder  ("MauMau" <maumau307@gmail.com>)
Responses Re: [bug fix or improvement?] Correctly place DLLs for ECPG apps in bin folder  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
Hi MauMau,

I have’t completed tested all the expects of submitted patch yet. I would like to share my findings so far. By looking at the patch I do feel that there is room for improvement in the patch, Instead of moving related dll’s from lib directory to bin directory later in the installation process, copy these files directly from release/debug directory earlier (PFA patch).


It seems unfortunate that Windows don’t have RPATH or similar logic implemented in OS. Alternate methods seems not appropriate, Only feasible option seems to be placing related dependency dll in same executable directory. At first one may think an alternate to create symbolic link for relative path in bin directory e.g. libpq.dll -> ..\lib\libpq.dll but it is unfortunate that normal user do require special permissions to create symbolic link otherwise it could help. There is SetDllDirectory or AddDllDirectory function available that effects only subsequent calls to LoadLibrary and LoadLibraryEx.

I will look into this patch further and let you know about my more findings. Thanks.

Regards,
Muhammad Asif Naeem



On Wed, Dec 4, 2013 at 5:07 PM, MauMau <maumau307@gmail.com> wrote:
From: "MauMau" <maumau307@gmail.com>

In addition, I'll remove libpq.dll from lib folder unless somebody objects.
Currently, libpq.dll is placed in both bin and lib.  I guess libpq.dll was
left in lib because it was considered necessary for ECPG DLLs.

The attached patch also removes libpq.dll from lib folder.  I don't mind whether this patch or yesterday's one will be adopted.  I'll add this to 2014-1 commitfest this weekend if the patch is not committed until then.

Regards
MauMau


--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Attachment

pgsql-hackers by date:

Previous
From: Amit Khandekar
Date:
Subject: Re: Fwd: Proposal: variant of regclass
Next
From: Greg Stark
Date:
Subject: Re: Recovery inconsistencies, standby much larger than primary