[Lazarus] Postgresql listen/notify

michael.vancanneyt at wisa.be michael.vancanneyt at wisa.be
Tue May 8 10:04:04 CEST 2012



On Tue, 8 May 2012, Mark Morgan Lloyd wrote:

> 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.

Well, that and a backup/restore API for those engines supporting it.

Michael.


More information about the Lazarus mailing list