Documentation
¶
Overview ¶
Package pg implements the PostgreSQL driver using pgx/v5 directly. Also used by CockroachDB (via the cockroachdb wrapper package).
Index ¶
Constants ¶
View Source
const DefaultPort = 5432
DefaultPort is the standard PostgreSQL port.
Variables ¶
This section is empty.
Functions ¶
func ConnectURL ¶
ConnectURL opens a PostgreSQL connection from a connection URL.
Types ¶
type Opts ¶
type Opts struct {
Host string
Port int
Database string
Username string
Password string
Readonly bool
// Options are driver-specific knobs threaded into the pgx connection
// URL as query parameters. Pass-through: pgx is the source of truth
// for which keys are valid.
Options map[string]string
}
Opts holds PostgreSQL connection options.
Click to show internal directories.
Click to hide internal directories.