Skip to content

PgEventTriggerContext

Namespace: Ankus

Assembly: Ankus.Runtime.dll

Owns an event trigger’s event name and command tag. Metadata snapshots remain readable after the callback; methods that query PostgreSQL require this invocation to be the active event context on its backend thread.

public sealed class PgEventTriggerContext

Inheritance: object

Gets the exact PostgreSQL command tag, including LOGIN for a login event.

public string CommandTag { get; }

Value: string

Gets the exact PostgreSQL event name, such as ddl_command_end.

public string Event { get; }

Value: string

Gets the event phase that caused this invocation.

public PgEventTriggerKind Kind { get; }

Value: PgEventTriggerKind

Copies collected DDL command metadata during this active ddl_command_end invocation. The returned immutable snapshots remain valid after later SPI calls and after the callback returns.

public IReadOnlyList<PgDdlCommand> GetDdlCommands()

Returns: IReadOnlyList<PgDdlCommand>

The commands in PostgreSQL’s result order, possibly empty.

Copies dropped-object metadata during this active sql_drop invocation. The returned immutable snapshots do not retain pointers into the deleted catalog entries.

public IReadOnlyList<PgDroppedObject> GetDroppedObjects()

Returns: IReadOnlyList<PgDroppedObject>

The dropped objects in PostgreSQL’s result order, possibly empty.

Copies the target relation OID and combined rewrite reason bits during this active table_rewrite invocation.

public PgTableRewrite GetTableRewrite()

Returns: PgTableRewrite

The owned table rewrite description.