Re: [bug fix or improvement?] Correctly place DLLs for ECPG apps in bin folder

From: Asif Naeem <anaeem(dot)it(at)gmail(dot)com>
To: MauMau <maumau307(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [bug fix or improvement?] Correctly place DLLs for ECPG apps in bin folder
Date: 2014-01-31 10:43:11
Message-ID: CAEB4t-Nj=3OFQQE4ZTk0biy9EJgybKPGFFLLusmSycTHj7-pzA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)gmail(dot)com> wrote:

> From: "MauMau" <maumau307(at)gmail(dot)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(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers
>
>

Attachment Content-Type Size
Win_lib_bin.patch application/octet-stream 914 bytes

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Stark 2014-01-31 11:09:14 Re: Recovery inconsistencies, standby much larger than primary
Previous Message Amit Khandekar 2014-01-31 10:39:35 Re: Fwd: Proposal: variant of regclass