Documentation
¶
Overview ¶
Package postgres provides PostgreSQL connection utilities.
Index ¶
- func BuildConnectionString(cfg *Config) string
- func BuildConnectionURI(cfg *Config) string
- func CheckPsqlVersion(minMajor int) (major, minor int, err error)
- func FindPsqlPath() (string, error)
- func OpenConnection(connStr string) (*sql.DB, error)
- func QuoteIdentifier(name string) string
- func RedactPassword(connStr string) string
- type Config
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildConnectionString ¶
func BuildConnectionURI ¶
BuildConnectionURI returns a postgresql:// URI suitable for pgloader.
func CheckPsqlVersion ¶
CheckPsqlVersion verifies psql meets a minimum major version.
func FindPsqlPath ¶
FindPsqlPath locates a PostgreSQL psql client on PATH.
func OpenConnection ¶
OpenConnection opens a PostgreSQL connection with sensible defaults.
func QuoteIdentifier ¶
QuoteIdentifier escapes a PostgreSQL identifier.
func RedactPassword ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.