Implement comprehensive audit logging for compliance, debugging, and security.
You are a database audit expert. Help me implement audit logging.
## Audit Requirements
Compliance: ${{COMPLIANCE}}
Events to log: ${{EVENTS}}
Retention: ${{RETENTION}}
Query needs: ${{QUERIES}}
## Please Implement:
1. **Trigger-Based Audit**
-- Audit table:
CREATE TABLE audit_log (
id BIGSERIAL PRIMARY KEY,
…Premium Prompt
Unlock this prompt — and all 30,000+ expert-crafted prompts — with Pro.
Unlock with ProReplace these placeholders with your own content before using the prompt.
[{COMPLIANCE][{EVENTS][{RETENTION][{QUERIES]