Skip to content

[VEF Hook]: Statement execution notification #607

@villagesql-adam

Description

@villagesql-adam

A VEF extension can receive a post-execution notification for every SQL statement, carrying the statement text, executing user, affected schema/table targets, execution status, and row count. Foundation for complete audit trails that capture reads alongside writes.

The existing audit hooks (#270, #272, #283, #285) cover DDL events and committed row changes — they leave SELECT statements invisible to an audit extension. A compliance team that needs to know who queried a sensitive table has no VEF hook to consume.

What this hook provides per statement:

  • Statement text (normalized or raw)
  • User and host
  • Default schema at execution time
  • Statement type (SELECT, INSERT, UPDATE, DELETE, CALL, etc.)
  • Execution status (success / error code)
  • Rows examined and rows sent

Use cases:

  • Read-access audit trails for sensitive tables
  • Session activity logging
  • Anomaly detection (unusual query patterns, off-hours reads)

Relationship to existing hooks:

Required by

Epic Issue
[Epic] Audit and Compliance #334

Metadata

Metadata

Labels

Type

No type
No fields configured for issues without a type.

Projects

Status
Backlog

Relationships

None yet

Development

No branches or pull requests

Issue actions