Page 1 of 1

TZConnection and default library path for PostgreSQL

Posted: 08.06.2017, 22:29
by ertank
Hello,

I was deeply annoyed about the problem that SQLdb is able to load PostgreSQL library without any need to provide "LibraryPath"

I have below modification in SVN 3988 in file ZPlainPostgreSQLDriver.pas

Code: Select all

  LINUX_DLL9_LOCATION = LINUX_DLL82_LOCATION;
This will be inserted as a new line number 67. Also modification of below line is necessary line number is 1768 (after inserting new line 67):

Code: Select all

    {$ELSE}
      FLoader.AddLocation(LINUX_DLL9_LOCATION);
    {$ENDIF}
Making these modifications and recompiling the library it can automatically load PostgreSQL 9 library if selected 'postgresql-9' as the protocol in object inspector. No more need to provide a strict path.

Tested under Raspberry Pi 3, PostgreSQL 9.4.12 server and client installed from apt-get packages. Working OK.
Tested under Linux debian 3.16.0-4-0 amd64 #1 SMP Debian 3.16.43-2 (2017-04-30) x86_64 GNU/Linux, PostgreSQL 9.4.12 client installed from apt-get packages. Working OK.

Unfortunately, I do not know how to prepare a diff file for merging into SVN. So, attached is the modified file.

Thanks.

Ertan

Re: TZConnection and default library path for PostgreSQL

Posted: 09.06.2017, 11:24
by marsupilami
Hello Ertan,

I added your changes. See Rev. 3990 on Zeos 7.2.
Thank you for helping.

With best regards,

Jan