Skip to content

PgOutputPluginAttribute

Namespace: Ankus

Assembly: Ankus.Runtime.dll

Exports a static method as the library’s logical decoding output plugin initializer, _PG_output_plugin_init.

[AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = false)]
public sealed class PgOutputPluginAttribute : Attribute

PostgreSQL loads an output plugin by library name, for example in pg_create_logical_replication_slot(‘slot’, ‘MyExtension’), and passes the plugin’s callback table to this export. Declare one synchronous static method returning void with a single by-value Ankus.Postgres.OutputPluginCallbacks* parameter, and assign the callbacks the plugin implements, typically from PgNativeCallbackAttribute properties. The method runs beneath the native callback guard: exceptions unwind its managed frames before PostgreSQL reports an error. The table belongs to PostgreSQL; do not retain its address. An extension declares at most one initializer.

Inheritance: object, Attribute

public PgOutputPluginAttribute()