Re: install libpq.dll in bin directory on Windows / Cygwin

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: install libpq.dll in bin directory on Windows / Cygwin
Дата
Msg-id 51F5730D.1040001@dunslane.net
обсуждение исходный текст
Ответ на install libpq.dll in bin directory on Windows / Cygwin  (Andrew Dunstan <andrew.dunstan@pgexperts.com>)
Ответы Re: install libpq.dll in bin directory on Windows / Cygwin  (Andres Freund <andres@anarazel.de>)
Re: install libpq.dll in bin directory on Windows / Cygwin  ("MauMau" <maumau307@gmail.com>)
Список pgsql-hackers
On 07/25/2013 06:27 PM, MauMau wrote:
> From: "Andrew Dunstan" <andrew.dunstan@pgexperts.com>
>> on Windows it's necessary to have libpq.dll/cygpq.dll either in the PATH
>> or in the same directory as client .exe files. The buildfarm client has
>> for many years simply copied this dll from the installation lib to the
>> installation bin directory after running "make install". But I can't
>> really see why we don't do that as part of "make install" anyway. I
>> haven't tested but I think something like this patch would achieve this
>> goal - it would fix something that's tripped a lot of people up over the
>> years.
>>
>> Comments? If we do this, should it be backported?
>
> I was just about to propose something related to this.
>
> On native Windows (not on Cygwin or MinGW), DLLs are in general placed 
> in (1) system directory (e.g. c:\windows\system32), (2) somewhere in 
> PATH, or (3) the same directory as EXEs which automatically load the 
> DLL at invocation. It's no problem that most DLLs in PostgreSQL's lib 
> directory, because they are loaded at runtime by postgres.exe by 
> calling LoadLibrary() specifying an absolute or a relative path.  
> However, the below files are misplaced:
>
> libecpg.dll
> libecpg_compat.dll
> libpgtypes.dll
>
> These should be placed in bin directory.  If done so, when running SQL 
> embedded C applications, users can just add bin in PATH, which is 
> usually done already.  Otherwise, users have to add both bin and lib 
> in PATH. Usually, lib is not added in PATH in many software.
>
> Could you please place the above files in bin and remove them from lib?


I don't have a problem adding them to the bin directory. I'd be very 
slightly wary of removing them from the lib directory, for legacy 
reasons. Maybe these changes should be done for git tip and not 
backported (or maybe just to 9.3). Or we could just decide to clean this 
mess in one fell swoop.

>
> BTW, why is libpq.dll in lib necessary?  For the above files?  If so, 
> we can remove libpq.dll from lib.  Or, libpqwalreceiver.dll needs it?

Not sure. Perhaps you could experiment and see if anything bad happens 
if libpq is just installed in the bin directory and not in lib.

cheers

andrew




В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: replication_reserved_connections
Следующее
От: Andres Freund
Дата:
Сообщение: Re: install libpq.dll in bin directory on Windows / Cygwin