Callbacks
In the DB Access Module for PostgreSQL, the database callbacks
preEnvAllocate and
postEnvAllocate are invoked during the construction of the
RWDBDatabase object. The callback
preEnvDestroy is invoked while destroying the
RWDBDatabase object. The connection callbacks are invoked with respect to the allocation, deallocation, connect and disconnect of the PostgreSQL connection handle
PGconn.
The Access Module for PostgreSQL allocates the connection handle and connects using a single vendor call PQconnectdb. Hence, the callbacks preConnAllocate, postConnAllocate and preConnect are invoked before calling PQconnectdb. Callback postConnect is invoked after the call to PQconnectdb.
The DB Access Module for PostgreSQL disconnects and deallocates the connection handle in a single vendor call PQfinish(). Hence, both callbacks preDisconnect() and preConnDestroy() are invoked before the call to PQfinish(). Please refer to the DB Interface Module User's Guide for more information.