On Sun, May 20, 2012 at 2:52 PM, John Townsend <jtownsend@xxxxxxxxxxxxxxxxxxxx> wrote: > By by-passing the "dll" (or "so" on Linux) library I mean you write function > or procedure calls to the server that is running as a service on Windows. > You don't use the library with its 160 exported functions. You connect > directly to the server thus saving one layer of protocols. To do this, you > have to translate all the c functions you need (not just the headers or ".h" > files) into pascal. Not a trivial task! It is possible to write functions and procedures on the server but they must still be invoked from the client side. Currently the only way to use any server side features is through the frontend/backend protocol. libpq is a library that handles the frontend side of the processing -- that's why the header is named libpq-fe.h: it's for the front end. You can bypass libpq but that would mean you'd have to write your own client side handler for the protocol -- definitely a non-trivial project and you'd probably end up with something worse than libpq unless you are an expert programmer. In other words, you can bypass libpq itself but not the protocol. To bypass the protocol, start moving your code into server functions. > Would it be worth it? Depends, but for most situations would not give you > more speed. With FPC comes a nice utility called h2pas.exe that does a > decent job and can save you a lot of time. You still have to clean some > translations. I believe Zeos has an already converted .pas file for libpq. merlin -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general