Let's not forget also that postgres doesn't have statement-level triggers _or_ packages, which limits what you can do with functions in other ways. For example, in Oracle you can populate an array of values in a "table" defined in a package header while you do a series of updates, and then process the table in a second procedure that is executed after the updates are done - which is a "standard hack for triggers which require selects on the mutating table", according to whoever wrote the bookmarks module.