[Lazarus] Postgres Dlls not found

Marc Santhoff M.Santhoff at t-online.de
Sat May 31 16:28:21 CEST 2008


Am Samstag, den 31.05.2008, 13:31 +0200 schrieb Dave Coventry: 
> Yes, DLL hell it is.
> 
> That's why I was dismayed to see that PQconnection used the DLL (and
> not just one, it uses several).
> 
> But I suppose if there's a good reason for it....

Most databases do it that way, e.g. Firebird and MySQL do have a client
side installation relying on a dll/so, too.

The library is the communication stub on the client side. Inside there
is the implementation of the communication protocoll which is mostly
unique for each sql server.

If the communication was done using the command line this would involve
a shell, the utility program and ssh/ssl. Looking at ssh would be using
what? A library implementing the communication protocoll on the client
side ... but one had to deal with moving query and result to and from a
TProcess or something. How would you do that when multiple result were
to transfer from the server? What if the variable $LANG was set by the
user? Do the lines transferrred as text end on #10, #13 or #10 + #13?
How would error codes from the server or the connection shell would be
differentiated from each other and handled?

Having a library eliminating a lot of such problems and encapsulating
the rest is not that bad. It costs you having to care for one thing: the
client computer has to have the correct dll/so or client package
installed that fits the server version in use.

Regards,
Marc





More information about the Lazarus mailing list