Sorry if people ask this frequently, didnt find a reference to anything like this.

Within some other database platforms one is capable of adding virtual tables that could be backed by ones own non persisted data.  An example usage can be reviewed in the following book:

http://nostarch.com/frameset.php?startat=appliance

Here the postgres engine is used as the central place for controlling an appliance.  Using this as a communication conduit to other appliance services.

Anyway, is there a way to add ones own table that ultimately provides the appropriate callbacks to ones own code? 
This would be similar to the SYS* tables.

Thanks in advance

Chris