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

postgresql

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package postgresql 实现 PostgreSQL 数据库驱动(纯 Go,经 pgx/v5,无 CGO)。

兼容性:pgx/v5 原生支持 PostgreSQL 9.6+,实测覆盖 pg 12 / 17。 走标准 database/sql 接口,元数据来自 information_schema 与 pg_catalog。

本包在被 import 时通过 init() 自动注册到 driver 注册表,注册名 "postgresql"。 CLI 在 main 里空导入本包即生效。

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Driver

type Driver struct{}

Driver 实现 driver.Driver,注册名 "postgresql"。

func (*Driver) Description

func (d *Driver) Description() string

func (*Driver) Name

func (d *Driver) Name() string

func (*Driver) Open

func (d *Driver) Open(cfg *driver.DatasourceConfig) (driver.Conn, error)

Open 依据配置创建连接。

func (*Driver) SupportedVersions

func (d *Driver) SupportedVersions() string

Jump to

Keyboard shortcuts

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