PostgreSQL Guide
This Skill queries official PostgreSQL documentation for accurate information.
When to Use
When the user asks about or the conversation involves:
- •PostgreSQL SQL syntax or commands
- •Data types, functions, operators
- •Database configuration (postgresql.conf, pg_hba.conf)
- •Performance tuning, query optimization
- •Backup, restore, high availability
- •Extensions, procedural languages
Execution Steps (IMPORTANT!)
You MUST WebFetch official documentation - never answer from memory!
Step 1: Identify Question Category
| Category | Description |
|---|---|
| SQL Commands | CREATE, SELECT, INSERT, UPDATE, DELETE, ALTER, etc. |
| Data Types | INTEGER, VARCHAR, JSON, ARRAY, etc. |
| Functions | String, Math, Date/Time, Aggregate, Window functions |
| Configuration | postgresql.conf, pg_hba.conf settings |
| Administration | Backup, Restore, Replication, Monitoring |
| Programming | PL/pgSQL, Triggers, Rules |
Step 2: WebFetch the Corresponding Documentation
Base URL: https://www.postgresql.org/docs/current/
Step 3: For Specific SQL Commands
SQL command documentation follows the pattern:
https://www.postgresql.org/docs/current/sql-{command}.html
Examples:
Step 4: Parse and Respond
Extract relevant information from WebFetch results and answer the user directly.
Common Questions Quick Reference
| Question | Fetch URL |
|---|---|
| "How to create index?" | sql-createindex.html |
| "JSON operators?" | functions-json.html |
| "Window functions?" | functions-window.html |
| "How to backup?" | backup.html |
| "Connection config?" | runtime-config-connection.html |
| "pg_hba.conf syntax?" | auth-pg-hba-conf.html |
| "EXPLAIN ANALYZE?" | using-explain.html |
| "PL/pgSQL syntax?" | plpgsql.html |
Important Reminder
Never answer PostgreSQL questions from memory!
PostgreSQL documentation is comprehensive and regularly updated. Always fetch the current documentation for:
- •Exact syntax (especially for complex commands)
- •Available options and parameters
- •Version-specific features
- •Best practices and warnings
Why not use a sub-agent?
Sub-agent responses require paraphrasing, which may cause information loss. Fetch the docs yourself for more direct and accurate information.