39P03 — event_trigger_protocol_violated
39P03
At a glance
39P03 is event_trigger_protocol_violated. Fixed event-trigger helpers reject calls outside their required sql_drop, table_rewrite, or event-trigger function context.
| Field | Value |
|---|---|
| SQLSTATE | 39P03 |
| Condition | event_trigger_protocol_violated |
| Status | active |
| Known present by | 9.5.0 |
| Locked snapshots | 9.5.25, 9.6.24, 10.23, 11.22, 12.22, 13.23, 14.24, 15.19, 16.15, 17.11, 18.6, 19beta3 |
| Macros | ERRCODE_E_R_I_E_EVENT_TRIGGER_PROTOCOL_VIOLATED |
| Aliases | — |
Meaning
An event-trigger helper was called without the state it requires. The fixed messages identify sql_drop, table_rewrite, or a general event-trigger function context, so this is a call-context violation rather than an object-existence error.
Diagnosis
Identify the helper and required event context from the message. Check whether the call belongs in a sql_drop, table_rewrite, or other event-trigger function.
Response
Move the helper into the required event-trigger context or remove the invalid call; replaying the same DDL does not change that context.
Versions
The locked catalogue records this condition from 9.5.0 in the listed formal snapshots and 19beta3; fixed source coverage is PostgreSQL 18.6.
Related
Sources
See the fixed event_trigger.c helper paths alongside the structured evidence record.