pg_dump Reference

Guide developers in querying PostgreSQL system catalogs for schema extraction.

994|57|Updated Jun 8, 2025
One-click install
npx skills add https://github.com/pgschema/pgschema --skill pg-dump-reference-pgschema
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pg_dump Reference
Source: https://github.com/pgschema/pgschema/tree/main/.claude/skills/pg_dump
Command: npx skills add https://github.com/pgschema/pgschema --skill pg-dump-reference-pgschema

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

pg_dump Reference helps engineers understand how PostgreSQL's system catalogs are queried and interpreted to build and debug pgschema's schema extraction features. It provides guidance on how to model queries, handle version differences (14-18), and replicate pg_dump logic for accurate object representation.

Core Features & Use Cases

  • Reference implementation patterns for system catalog queries
  • Guidance for debugging inspector.go and diff components
  • Version-aware strategies across PostgreSQL 14-18

Quick Start

Consult the pg_dump source to model and adapt system catalog queries for your pgschema features.

Frequently Asked Questions about pg_dump Reference

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I extract PostgreSQL schema information from system catalogs?

Extract PostgreSQL schema information by querying system catalogs using patterns modeled after the pg_dump source. This approach guides you in adapting catalog queries and handling version-specific behavior across PostgreSQL 14-18.

How does pg_dump query system catalogs for schema extraction?

pg_dump queries system catalogs using specialized inspecting queries and deparsing helpers to accurately represent database objects. You can model and adapt these query patterns to build schema extraction logic in your own tooling.

Can I adapt PostgreSQL system catalog queries for use with Go and pgx?

Yes, you can adapt PostgreSQL system catalog queries for Go and pgx. The reference provides guidance on translating pg_dump query patterns into pgx-compatible code for building schema extraction features.

How do I handle version-specific schema extraction differences across PostgreSQL 14-18?

Handle version-specific differences across PostgreSQL 14-18 by implementing version-aware system catalog queries. The reference provides strategies for adapting schema extraction logic to account for catalog changes across each PostgreSQL version.

How do I debug schema extraction issues in inspector and diff components?

Debug schema extraction issues in inspector and diff components by consulting the pg_dump source to verify your system catalog queries. This helps identify discrepancies between your query logic and expected object representations.