[Lazarus] Postgresql listen/notify
Mark Morgan Lloyd
markMLl.lazarus at telemetry.co.uk
Tue May 8 10:01:45 CEST 2012
Leonardo M. Ramé wrote:
> Hi, does sql-db allows to capture PostgreSql notify events?. If yes,
> how?.
Indirectly. You have to set it up using the TPQConnection.Handle since
this has long-term persistence, and have to make direct API calls *not*
ExecuteDirect() since that uses a temporary handle. It works, but is
sensitive to transient network failures etc.: the server end can forget,
so it's wise to have a fallback mechanism.
I don't know whether it should be treated as a candidate for an
extension to the sql-db API, since as far as I know there's something
comparable (implemented very differently) on Firebird but nothing else.
--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk
[Opinions above are the author's, not those of his employers or colleagues]
More information about the Lazarus
mailing list