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

From: "MauMau" <maumau307(at)gmail(dot)com>
To: <pgsql-hackers(at)postgresql(dot)org>
Subject: [bug fix or improvement?] Correctly place DLLs for ECPG apps in bin folder
Date: 2013-12-03 13:36:13
Message-ID: 8CE1F11715C84DF1B50269005A39E135@maumau
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello,

The attached patch implements the below proposal, and moves libecpg.dll,
libecpg_compat.dll, and libpgtypes.dll from lib to bin folder on Windows,
where they should be.

http://www.postgresql.org/message-id/10470B394DB8486F93AC60107CC44C8B@maumau

As Andrew-san said, I don't expect it to be back-ported.

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.

Would removing libpq.dll from lib cause any problem? No. The following
modules in lib need libpq.dll when they are loaded by postgres.exe by
LoadLibrary(). But the necessary libpq.dll is loaded from bin folder.
According to the DLL search order rule, DLLs are loaded from the same folder
as the loading program, which is postgres.exe in our case.

dblink.dll
libpqwalreceiver.dll
postgres_fdw.dll

Regards
MauMau

Attachment Content-Type Size
ECPG_DLL_not_move_libpq.patch application/octet-stream 645 bytes

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Stark 2013-12-03 13:37:56 Re: Extension Templates S03E11
Previous Message Andres Freund 2013-12-03 13:24:46 Re: logical changeset generation v6.7