用于查询优化、模式设计、索引和安全性的PostgreSQL数据库模式。基于Supabase最佳实践。
81
75%
Does it follow best practices?
Impact
91%
1.26xAverage score across 3 eval scenarios
Passed
No findings from the security scan
Fix and improve this skill with Tessl
tessl review fix ./docs/zh-CN/skills/postgres-patterns/SKILL.mdData types and index selection
bigint for IDs
100%
100%
text for strings
70%
100%
timestamptz for timestamps
100%
100%
numeric for currency
100%
100%
boolean for flags
100%
100%
GIN for JSONB
100%
100%
BRIN for time-series
0%
100%
Partial index usage
100%
100%
Covering index INCLUDE
0%
0%
Composite index column order
100%
100%
RLS policy optimization and security configuration
SELECT wraps auth.uid() in RLS
0%
100%
REVOKE public schema
50%
100%
max_connections set
0%
100%
work_mem set
50%
100%
idle_in_transaction timeout
50%
100%
statement_timeout set
50%
100%
pg_stat_statements enabled
100%
100%
pg_reload_conf called
100%
100%
RLS enabled on table
100%
100%
Correct timestamp type in schema
100%
100%
bigint for user/tenant IDs
0%
50%
Cursor pagination and queue processing
Cursor pagination pattern
100%
100%
No OFFSET in pagination
100%
100%
FOR UPDATE SKIP LOCKED
100%
100%
RETURNING clause in queue update
100%
100%
UPSERT ON CONFLICT
100%
100%
Composite index equality-first order
100%
100%
Covering index for listing query
0%
0%
Queue status index
100%
100%
Correct timestamp type
100%
100%
e04ea0b
Table of Contents
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.