With Postgres you can associate events and notifications to tables.
This function allows you to detect and handle such events.
With no arguments, resets and removes any callback you might have
put previously, and any polling cycle.
With one argument, sets the notification callback (there can be only
one for each sqlobject).
The callback function must return no value, and takes a string argument,
which will be the name of the table on which the notification event
has occurred. In future versions, support for user-specified arguments
will be added.