postgres

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

PostgreSQL Expert Skills

PostgreSQL专家技能

This skill provides comprehensive PostgreSQL expertise through specialized references. Load the appropriate reference based on the task.
本skill通过专项参考文档提供全面的PostgreSQL专业支持,你可以根据任务加载对应的参考文档。

Available References

可用参考文档

Table Design

表设计

  • design-postgres-tables — Data types, constraints, indexes, JSONB patterns, partitioning, and PostgreSQL best practices. Use for any general table/schema design task.
  • design-postgis-tables — PostGIS spatial table design: geometry vs geography types, SRIDs, spatial indexing, and location-based query patterns. Use when the task involves geographic or spatial data.
  • design-postgres-tables —— 数据类型、约束、索引、JSONB使用模式、分区以及PostgreSQL最佳实践。适用于所有通用表/schema设计任务。
  • design-postgis-tables —— PostGIS空间表设计:geometry与geography类型对比、SRIDs、空间索引以及基于位置的查询模式。适用于涉及地理或空间数据的任务。

Search

搜索

  • pgvector-semantic-search — Vector similarity search with pgvector: HNSW/IVFFlat indexes, halfvec storage, quantization, filtered search, and tuning. Use for embeddings, RAG, or semantic search.
  • postgres-hybrid-text-search — Hybrid search combining BM25 keyword search with pgvector semantic search using RRF. Use when combining keyword and meaning-based search.
  • pgvector-semantic-search —— 基于pgvector的向量相似度搜索:HNSW/IVFFlat索引、halfvec存储、量化、过滤搜索以及性能调优。适用于向量嵌入、RAG或语义搜索相关任务。
  • postgres-hybrid-text-search —— 使用RRF结合BM25关键词搜索与pgvector语义搜索的混合搜索方案。适用于需要结合关键词搜索和语义搜索的场景。

TimescaleDB

TimescaleDB

  • setup-timescaledb-hypertables — Hypertable creation, compression, retention policies, continuous aggregates, and indexes. Use when setting up TimescaleDB from scratch.
  • find-hypertable-candidates — SQL queries to analyze existing tables and score them for hypertable conversion. Use when evaluating which tables to migrate.
  • migrate-postgres-tables-to-hypertables — Step-by-step migration: partition column selection, in-place vs blue-green, validation. Use when executing a migration.
  • setup-timescaledb-hypertables —— 超表创建、压缩、留存策略、连续聚合以及索引相关内容。适用于从零开始搭建TimescaleDB的场景。
  • find-hypertable-candidates —— 用于分析现有表并评估其转换为超表适配度的SQL查询。适用于评估哪些表适合迁移的场景。
  • migrate-postgres-tables-to-hypertables —— 分步迁移指南:分区列选择、原地迁移 vs 蓝绿部署、验证方案。适用于执行迁移操作的场景。

How to Use

使用方法

  1. Identify which reference matches the user's task from the descriptions above.
  2. Load the reference file to get detailed instructions and SQL patterns.
  3. For tasks spanning multiple areas (e.g., "design a table with vector search"), load multiple references as needed.
  1. 从上述描述中找到与用户任务匹配的参考文档。
  2. 加载对应的参考文件获取详细指引和SQL范式。
  3. 对于跨多个领域的任务(例如「设计一个支持向量搜索的表」),可根据需要加载多份参考文档。