Creating a trigger-based audit log for PostgreSQL