Scott Cain <cain@cshl.org> writes:
> Heck! So much for feeling close. It is somewhat frustrating to me that
> such an obviously useful tool (having and using audit tables) should be
> so difficult to implement.
The only really reasonable way to implement this is as a C function
anyway. I think anything involving a PL language is going to be a huge
performance drag, if you intend to put it on essentially every table.
There are some pretty closely related examples in contrib/spi/, though
I don't see anything that does *exactly* what you want. If you came up
with something that does, I think it'd be reasonable to add it to that
set of examples ...
regards, tom lane