SQL query interface for pgmq-specific operations.
Provides functions for managing pgmq NOTIFY triggers and querying pgmq extension metadata.
Summary
Functions
Disables NOTIFY triggers for a pgmq queue.
Enables NOTIFY triggers for a pgmq queue.
Gets the installed pgmq version.
Functions
Disables NOTIFY triggers for a pgmq queue.
Calls pgmq.disable_notify_insert/1 to remove the INSERT trigger
that fires NOTIFY events when messages are added to the queue.
@spec enable_notify_insert(module(), String.t(), non_neg_integer()) :: :ok | {:error, term()}
Enables NOTIFY triggers for a pgmq queue.
Calls pgmq.enable_notify_insert/2 to add an INSERT trigger
that fires NOTIFY events when messages are added to the queue.
The throttle_ms parameter controls how frequently notifications fire.
Gets the installed pgmq version.
Checks two sources in order:
pg_extensioncatalog — works when pgmq is installed viaCREATE EXTENSION pgmq- Feature detection — checks for the
enable_notify_insertfunction in thepgmqschema, which indicates pgmq >= 1.8.0 installed from a SQL dump (e.g., on Neon or other managed Postgres)
Returns {:ok, version} if pgmq is detected, or {:error, :not_installed} if not.