I am attempting to determine if the problem I am having is in fact a bug and not operator error before making a bug report.
Fair enough. You might want to post the actual errors you're getting and which guide/tutorial/readme you were using when compiling the units.
Also, if you get no answer here, the fpc and lazarus mailing lists have a lot of traffic and people there might be able to help you.
I would imagine the same applies to Lazarus. IIRC, I played with a Postgresql application a long time ago (Windows client, separate Linux database server), don't remember any problems. Did I tell you you had to run a server on your client machine? No, I told you it is an option if you have no separate database server.
If the same applied to lazarus and postgres then installing the SQLdb package would be all that would be required.
In the research I have done on the lazarus forums and the wiki several posters suggested that in order to get around this error and the related libpq.so error on the linux side you had to install the server on the development machine, not simply have it installed on a net reachable server, but on the machine that lazarus is running on. So you can not only put an entry in the path, but copy the dll to the application. (The precise meaning of application is not specified.) Unceremoniously copying dlls around strikes me as a bad idea both from personal experience and from the large number of posters who have stated that copying dlls around was a bad idea.
If a small set of DLLs do have be included with the distribution of the client, not an unheard of situation, then the list of these and a method of generation have to be clarified.
Jonathan
"The precise meaning of application is not specified": IIRC, Windows searches for DLLs in a couple of places, e.g. in your path, which should include the System directory (typically c:\windows\system32\), and finally in the "current" directory the application is running in.
When someone tells you to copy dlls, I would indeed be as cautious as you are: don't just copy them to the system directory overwriting other versions, as other software may now fail if they rely on specific versions of dlls.
You can, however, safely (well, if the dlls themselves are not infected with viruses etc) copy dlls to the directory where your compiled application resides in.
3 scenarios:
1. You need to have just SQLDB installed and nothing else. This works for dbf support, as that is built in into FreePascal.
2. You need to have just SQLDB installed and some kind of server somewhere. This works for e.g. the MySQL and Firebird/Interbase FreePascal units are translations of the C client files, speak the wire protocol without any additional help, and can therefore function without any dlls/shared libraries.
3. You need to have SQLDB installed, and some kind of dll that SQLDB calls for your database driver. This also applies to embedded databases such as SQLite and Firebird embedded, as their embedded engine is provided by a dll.
I still think situation 3 applies so you would just need to copy the Postgresql client dll only, plus required components. (Why would you need server components if you only have to speak the wire protocol over the network - for which the client dll is meant?)
Have a look here:
http://paginas.fe.up.pt/~asousa/wiki/doku.php?id=proj:lazarus_projects#easy_dbIt apparently includes kerberos, xml and other libraries that might not be necessary.
I'd suggest trying to strip out everything except libpq.dll and see if it still works..
Does that application compile and run for you?
I do agree that the required dlls need to be documented, e.g in
http://wiki.lazarus.freepascal.org/Lazarus_Database_Tutorial#Lazarus_and_PostgreSQL... but the PostgreSQL documentation is very thorough and probably specifies exactly what dlls are needed for client applications.
HTH,
BigChimp