Looks up official PostgreSQL documentation for a given topic. Returns a concise, cited summary.
This skill retrieves authoritative information from the official PostgreSQL documentation for a given topic. It returns a concise summary with citations to the specific documentation pages.
/postgres docs {topic_or_question}
Examples:
/postgres docs lock modes and conflicts/postgres docs EXPLAIN ANALYZE output format/postgres docs autovacuum tuning parameters/postgres docs partial index creation../references/documentation-pages.md — Maps common topics to page IDs and defines the current PostgreSQL .search_docs — search the PostgreSQL documentation../scripts/search_docs -q "QUERY" -v VERSION [-p PAGE]
Returns a numbered list of matching doc pages with page IDs and snippets.
fetch_doc — fetch a documentation page../scripts/fetch_doc -d PAGE_ID -v VERSION [-c "SNIPPET"] [-n LINES]
--context: returns the full page as plain text.--context "SNIPPET": locates the snippet in the page and returns only the surrounding lines (default: 20 lines above and below; adjust with --context-lines).Read ../references/documentation-pages.md to get the current PostgreSQL version and check if the topic maps to a known page ID.
If a page ID is known, fetch it directly:
../scripts/fetch_doc -d PAGE_ID -v VERSION
If no page ID is known, search for the topic:
../scripts/search_docs -q "topic" -v VERSION
Then fetch the most relevant result.
Use the snippet from the search result as the --context flag to get a focused excerpt:
../scripts/fetch_doc -d PAGE_ID -v VERSION -c "snippet from search"
Synthesize the fetched content into a concise summary that directly addresses the topic or question.
Always include a Sources section at the end with links to the specific documentation pages referenced.
The URL format is https://www.postgresql.org/docs/{version}/{page_id}.html.
../references/documentation-pages.md unless the user explicitly requests a different version.--context when you already know which section is relevant to reduce output size.