Re: Libpq question

From: Mark Morgan Lloyd <markMLl(dot)pgsql-general(at)telemetry(dot)co(dot)uk>
To: pgsql-general(at)PostgreSQL(dot)org
Subject: Re: Libpq question
Date: 2012-06-01 08:41:16
Message-ID: jq9v7d$jke$1@pye-srv-01.telemetry.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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]

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Vitalii Tymchyshyn 2012-06-01 09:06:51 Re: Trouble with plan statistics for behaviour for query.
Previous Message Bret Stern 2012-06-01 05:20:11 libpq Windows 7 64