postgres

package
v1.14.0 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package postgres provides a live schema Loader for PostgreSQL databases. It queries information_schema and pg_catalog to retrieve tables, columns, indexes, and foreign keys.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Loader

type Loader struct{}

Loader implements db.Loader for PostgreSQL.

func NewLoader

func NewLoader() *Loader

NewLoader returns a new Postgres schema loader.

func (*Loader) Load

func (l *Loader) Load(db *sql.DB, schemaName string) (*dbschema.DatabaseSchema, error)

Load returns the full schema for all user tables in the given schemaName. If schemaName is empty, "public" is used.

func (*Loader) LoadTable

func (l *Loader) LoadTable(db *sql.DB, schemaName, tableName string) (*dbschema.Table, error)

LoadTable returns schema for a single named table. If schemaName is empty, "public" is used.

Jump to

Keyboard shortcuts

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