extension

package
v0.0.0-...-6ee8545 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 7, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	PromscaleExtensionVersion semver.Version
)

Functions

func AreSupportedPromscaleExtensionVersionsAvailable

func AreSupportedPromscaleExtensionVersionsAvailable(conn *pgx.Conn, extOptions ExtensionMigrateOptions) (bool, error)

func CheckExtensionsVersion

func CheckExtensionsVersion(conn *pgx.Conn, migrationFailedDueToLockError bool, extOptions ExtensionMigrateOptions) error

CheckExtensionsVersion checks for the correct version and enables the extension if it is at the right version

func CheckPromscaleVersion

func CheckPromscaleVersion(conn *pgx.Conn) error

func CheckVersions

func CheckVersions(conn *pgx.Conn, migrationFailedDueToLockError bool, extOptions ExtensionMigrateOptions) error

CheckVersions is responsible for verifying the version compatibility of installed Postgresql database and extensions.

func FetchInstalledExtensionVersion

func FetchInstalledExtensionVersion(conn *pgx.Conn, extensionName string) (semver.Version, bool, error)

func InstallUpgradePromscaleExtensions

func InstallUpgradePromscaleExtensions(db *pgx.Conn, extOptions ExtensionMigrateOptions) error

func InstallUpgradeTimescaleDBExtensions

func InstallUpgradeTimescaleDBExtensions(connstr string, extOptions ExtensionMigrateOptions) error

InstallUpgradeTimescaleDBExtensions installs or updates TimescaleDB Note that after this call any previous connections can break so this has to be called ahead of opening connections.

Also this takes a connection string not a connection because for updates the ALTER has to be the first command on the connection thus we cannot reuse existing connections

func MigrateExtension

func MigrateExtension(conn *pgx.Conn, extName string, extSchemaName string, validRange semver.Range, rangeString string, extOptions ExtensionMigrateOptions) error

Types

type ExtensionMigrateOptions

type ExtensionMigrateOptions struct {
	Install           bool
	Upgrade           bool
	UpgradePreRelease bool
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL