Re: Libpq question - Mailing list pgsql-general

From Mark Morgan Lloyd
Subject Re: Libpq question
Date
Msg-id jq9v7d$jke$1@pye-srv-01.telemetry.co.uk
Whole thread Raw
In response to Re: Libpq question  (zeljko <zeljko@holobit.net>)
List pgsql-general
zeljko wrote:
> John Townsend wrote:
>
>> It appears that some developers (Davart) are by-passing the standard
>> client library, “libpq.dll”, and directly accessing the server using
>> Delphi or FPC. I am not sure of the advantage here. All libpq.dll
>
> I'm FPC user and I use libpq.so(.dll,.dylib) via zeoslib.
> Those who bypass libpq probably uses odbc connections or similar.

Apologies for my rather late comment.

ODBC, JDBC, Zeos etc. are all appropriate if you want an app to be able
to contact different types of backend. However, the further you move
from native connections, the more difficult it becomes to use
PostgreSQL-specific functionality such as the listen/notify mechanism:
I've used this to good effect in an FPC/Lazarus program and while I
believe it can be hacked in via ODBC the result is hardly pretty.

In addition, while it is in principle possible to "roll your own"
interface library, the libpq+pg combination has been in use for 10+
years, is actively maintained, and (hopefully) is bug- and
backdoor-free. Reinventing this particular wheel is definitely not
something that should be approached casually.

--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]

pgsql-general by date:

Previous
From: Bret Stern
Date:
Subject: libpq Windows 7 64
Next
From: John Townsend
Date:
Subject: Re: Procedural Languages