Correct Postgresql setup

What’s the correct method to get the postgresql driver working? It works on my older VM (Delphi XE8) but I’ve not been able to get it working on the new (D12) VM. The app works fine, it’s just the connection manager part of SM that fails.
If I add the debug setting to RemObjects.DataAbstract.Unmanaged.ini, and the error is this:

TConnectionTesterThread.Execute: EROUnknownExceptionReceivedFromServer, [FireDAC][Phys][PG]-314. Cannot load vendor library [libpq.dll]. The specified module could not be found.
Hint: check it is in the PATH or application EXE directories, and has x86 bitness.

I have the 32-bit version of libpq.dll in the windows\SysWOW64 folder and I’ve also tried creating a specific folder for it and adding that to the path, but still no joy.


Does FireDAC able to connect to PostgreSQL w/o DataAbstract?
I can suggest to launch Dependency Walker and see if libpq.dll is depended on other dll (like msvcr90.dll, etc) that isn’t present on your pc

No, it wasn’t.

This wasn’t present. Sorted now, thanks very much once again.

@EvgenyK , As an update to this one, is it possible to get SM to connect to the 64-bit Postgresql? I don’t seem to be able to get SM to load the 64-bit libpq.dll as it says it’s not 32-bit of course. However, the 32-bit version of it won’t connect to version 16 of postgresql as it will only work with 64-bit.


as a temporary workaround, you can use .net driver for filling schema info.

in runtime you can use your FireDAC connection string.

So, I can’t use schema modeller ? Runtime is fine, it works brilliantly, I’m talking about adding a new table to my schema in my Delphi server, which edits the dfm so not sure how the .net would do that?

I’ve been doing it myself by editing the DFM directly but it’s a bit slow.


I mean - use .NET driver inside Schema Modeler:

You should be able to add a new table into existing schema

1 Like

Oh, I see, I’ve never even downloaded the .Net DA, so I assume that option will appear if I do and then install that. I’ll try it, thanks Eugene.