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

Поиск
Список
Период
Сортировка
От MauMau
Тема Re: install libpq.dll in bin directory on Windows / Cygwin
Дата
Msg-id 10470B394DB8486F93AC60107CC44C8B@maumau
обсуждение исходный текст
Ответ на install libpq.dll in bin directory on Windows / Cygwin  (Andrew Dunstan <andrew.dunstan@pgexperts.com>)
Список pgsql-hackers
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?

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?

Regards
MauMau





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

Предыдущее
От: didier
Дата:
Сообщение: Re: Design proposal: fsync absorb linear slider
Следующее
От: Robert Haas
Дата:
Сообщение: Re: getting rid of SnapshotNow