install

suspend fun install()(source)

Installs the required components or extensions for the pgmq functionality.

This method verifies whether the pgmq schema is already installed in the database. If not, it attempts to install it based on the specified options.

Key behaviors include:

  • Checks for the existence of the pgmq schema in the database.

  • If the schema is not present, it uses the configuration in options to determine whether to install from files or extensions, or to raise an error.

  • Re-verifies the installation after performing the installation procedure.

Throws

if the pgmq installation cannot be verified and options.autoInstall is disabled.