{ }
Resource profile / PostgreSQL Schema Exploration
About this skill

Workflow & requirements

Explore a PostgreSQL database

Start with the user's question, not a full-database audit unless that is the explicit ask. Use the database connection already available to you; if none is available, ask for access or work from provided schema files. Stay within the database and schemas the user has authorized. Catalog metadata can reveal sensitive names or source code: do not export it unnecessarily.

Workflow

  1. Establish the current database, server version, role, and scope. Use overview for a small inventory. Choose relevant schemas; do not assume public contains the application.
  2. Pick the most promising object(s) and read only the matching drill-down reference: tables, partitioning/inheritance, foreign tables, views, routines, triggers, security/RLS, or extensions. Follow cross-references only when the question requires them.
  3. Corroborate meaning with comments, definitions, keys, and known dependencies. Names are clues, not proof of business meaning. If data-derived values would help, use data-derived values only after obtaining approval for the specific columns and access method. Ask the user when semantics remain ambiguous.
  4. If the user wants SQL, follow query authoring: establish join keys and grain, then validate a vetted read-only query with plain EXPLAIN where authorized. Do not mistake a valid plan for proof of business semantics.
  5. Stop once you can answer. Report the specific schema-qualified objects and evidence, distinguish observations from inferences, and state limitations (permissions, stale statistics, missing dependencies, unknown application logic).

Example finding

Illustrative only; report facts verified in the target database:

  • Observed: sales.orders has a primary key on order_id and a foreign key from account_id to sales.accounts.account_id.
  • Inferred: sales.orders likely records one row per order; the keys support this, but do not establish what the business calls an “order.”
  • Unresolved: The catalog does not show whether canceled orders remain in this table. Confirm with the application owner before assuming they do.

Safety and execution

  • Prefer structural catalog queries; pg_stats is data-derived and requires approval too. Do not change schema, data, roles, or session-wide settings without authorization. Never call discovered functions or procedures, refresh materialized views, or run EXPLAIN ANALYZE on unknown queries. A function marked STABLE or IMMUTABLE is not a safety guarantee.
  • If your client supports transactions, use a read-only transaction and a reasonable statement timeout for exploration. Metadata queries are not a license to run full-table counts or unrestricted scans. Ask before sampling data; sample only when necessary, with explicit limits and a clear understanding of table size and access controls.
  • All reference queries are plain PostgreSQL SQL. Bind $1, $2, etc. as values using your client's API. psql users can follow the optional psql adapter. Never interpolate an untrusted object name as raw SQL; placeholders cannot replace SQL identifiers in data queries.
  • Queries target PostgreSQL 18. Each version-sensitive section notes alternatives for older majors where applicable. Check server_version_num first. If a query fails due to permissions or version differences, report the limitation instead of guessing.
PACKAGE TRANSPARENCY

Inspect before installing

Source: Tiger Data · Apache-2.0 · SHA-256 shown alongside the download.

17 files28672 ZIP bytes0 script/code files

License file included. A license and checksum are not a security certification. Review package instructions and scripts before running them.

View files and uncompressed sizes
Machine-readable installation guide →
CATALOG REVIEW NOTES

Know what you need before installing

Source and packaging checks recorded on 2026-10-03. These notes are not safety certification or measured task performance.

Requirements

An authorized PostgreSQL connection or schema files. Guidance targets PostgreSQL 18 and documents older-major alternatives; check server_version_num and permissions.

Costs, access & practical limits

Apache-2.0 material; separate hosting, tooling, model access and services may have costs. Full skill/agent runtime evaluation has not been performed. Catalog metadata can contain sensitive names or routine source. Statistics and sampled rows have separate access requirements. Read-only transactions/timeouts do not make unknown functions or planning hooks harmless. Selected catalog checks do not establish business meaning, complete permissions, all references or full version compatibility. No connection or MCP server configured.

View the recorded checks
  • Pinned original bytes verified against Git blob hashes
  • Complete Apache-2.0 license and publisher NOTICE retained
  • Core identity and local references validated
  • Selected SQL and version boundaries reviewed; limitations disclosed

Upstream commit: b236d3583fb51f5ef009d2c95d4fc361df748280

Runtime status: not tested by this catalog. Configure your client and test the skill in your own environment.

SCENARIOS

Inputs, criteria and recorded outcomes

Records are supplied by the site administrator and bound to a specific package. They are not third-party safety certification. This page does not execute skills.

Schema catalog SQL: eleven bounded read-only checks

Reported passed · vb236d3583fb5

View input and acceptance criteria

Input

Execute selected overview, tables and views reference queries in a read-only PostgreSQL transaction. Bind schema/table values containing spaces, quotes and semicolons; inspect synthetic columns, constraints, foreign keys and view definitions without running the view.

Acceptance criteria

Eleven selected assertions match on PostgreSQL 17.11, including bound values, missing objects and read-only mutation rejection. This is not a complete reference, PostgreSQL 18 compatibility or permission-matrix audit.

Recorded outcome

Eleven bounded assertions for selected original catalog SQL, with client placeholders adapted to psycopg parameter binding. Not all reference queries or versions; superuser QA results do not establish least-privilege compatibility. No full skill execution.

{
  "executed_at": "2026-10-03T08:29:31.623571+00:00",
  "server_version": "17.11 (Debian 17.11-1.pgdg12+2)",
  "pgvector_version": "0.8.7",
  "count": 11,
  "checks": [
    {
      "case": "catalog_context_read_only",
      "passed": true
    },
    {
      "case": "catalog_schema_inventory",
      "passed": true
    },
    {
      "case": "catalog_quoted_schema_relations",
      "passed": true
    },
    {
      "case": "catalog_columns_identity_not_null",
      "passed": true
    },
    {
      "case": "catalog_constraints",
      "passed": true
    },
    {
      "case": "catalog_foreign_key",
      "passed": true
    },
    {
      "case": "catalog_direct_view_dependency",
      "passed": true
    },
    {
      "case": "catalog_view_definition_not_execution",
      "passed": true
    },
    {
      "case": "catalog_table_value_binding_no_injection",
      "passed": true
    },
    {
      "case": "catalog_missing_schema_empty",
      "passed": true
    },
    {
      "case": "read_only_rejects_mutation",
      "passed": true
    }
  ],
  "source_file_sha256": {
    "schema-exploration/references/overview.md": "f8be7d79ecf0437db77de378dd6e9f615e8e9c8df44eae7907d01c4ee6cceae8",
    "schema-exploration/references/tables.md": "a5911dd9feb7e1c37c1c9c27902662f656944ddb956e88e780ce2a2cae9a8e5d",
    "schema-exploration/references/views.md": "03d588a87bf2bdd3dd5baea3c9bf9ce2ec5c515853b251b40645cf97c13ab7e3"
  },
  "probe_sha256": "b9bf96bf549066c34afec211519724330af701489c2718fba0179d82621ceee9",
  "batch_sha256": "ffdc58d8b50dfde1f62e25b83d3dc3c1500e6a62df01a1a594d67f185b4e2191",
  "skill_version": "b236d3583fb5",
  "package_sha256": "3882de370424e3971fc3954885f0b0cb2eca264f565b5aac76afe63d4fa6b9b2"
}

Environment

Isolated disposable PostgreSQL 17.11 and pgvector 0.8.7; synthetic objects only, no production volume or connection. Memory-backed database, statement timeouts; QA superuser. Not a least-privilege audit.

Package SHA-256: 3882de370424e3971fc3954885f0b0cb2eca264f565b5aac76afe63d4fa6b9b2

Outcome recorded: 2026-10-03 08:29 UTC

Community reviews

★ New

Be the first to share your experience.

Sign in to leave a review →

More to explore

View all ↗