add call back function to pgdatabase so that application can capture the changes.