Skip to content

Extension Operations

Operation: createExtension

pgm.createExtension( extension )

IMPORTANT

Install postgres extension(s) - postgres docs

Alias: addExtension

Arguments

NameTypeDescription
extensionstring or array[string]Name(s) of extensions to install
optionsobjectCheck below for available options

Options

OptionTypeDescription
ifNotExistsbooleanInstall extension only if it does not exist (default false)
schemastringThe name of the schema in which to install the extension's objects

Reverse Operation: dropExtension

pgm.dropExtension( extension )

IMPORTANT

Un-install postgres extension(s) - postgres docs

Arguments

NameTypeDescription
extensionstring or array[string]Name(s) of extensions to install
drop_optionsobjectCheck below for available options

Options

OptionTypeDescription
ifExistsbooleanDrops extension only if it exists
cascadebooleanDrops also dependent objects