Help us shape the future of Go! Take the 2026 Go Developer Survey

pg

package
v0.0.0-...-1fa2acd Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package pg adapts row to PostgreSQL through github.com/jackc/pgx/v5.

Importing it registers nothing globally beyond what pgx's stdlib shim already does; the root row package stays driver-free so a program that only speaks SQLite never links pgx.

Index

Constants

This section is empty.

Variables

View Source
var Dialect row.Dialect = dialect{}

Dialect is the PostgreSQL dialect. It is stateless and safe to share.

Functions

func Open

func Open(ctx context.Context, dsn string, opts ...row.Option) (*row.DB, error)

Open connects to PostgreSQL.

The DSN is anything pgx accepts, in either URL form ("postgres://user:pass@host/db") or keyword form ("host=... dbname=..."). Open verifies the connection before returning, so a bad DSN fails here rather than at the first query.

Types

This section is empty.

Jump to

Keyboard shortcuts

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