postgres

package
v0.20.4 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2022 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MinPostgresVersion = version.Must(version.NewVersion("11.0"))

Functions

func ValidatePostgresVersion

func ValidatePostgresVersion(ctx context.Context, pool *pgxpool.Pool, want *version.Version) error

ValidatePostgresVersion checks that PostgreSQL instance version available through pool is not lower than wanted version. In this case it returns nil. Otherwise returns error describing current and desired version or any other error encountered during the check.

Types

type Executor

type Executor struct {
	// contains filtered or unexported fields
}

func New

func New(logger hclog.Logger, dsn string) Executor

func (Executor) Finalize

func (e Executor) Finalize(ctx context.Context) error

func (Executor) Setup

func (e Executor) Setup(ctx context.Context) (string, error)

func (Executor) Validate

func (e Executor) Validate(ctx context.Context) (bool, error)

Jump to

Keyboard shortcuts

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