postgresql-core-schema

PostgreSQL Core & Schema

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "postgresql-core-schema" with this command: npx skills add sraloff/gravityboots/sraloff-gravityboots-postgresql-core-schema

PostgreSQL Core & Schema

When to use this skill

  • Creating or modifying PostgreSQL tables (DDL).

  • Working with JSONB, Arrays, or specialized Postgres types.

  • Creating triggers or functions (PL/pgSQL).

  1. Data Types
  • Timestamps: Always use timestamptz (Timestamp with Time Zone), rarely timestamp (without TZ).

  • Text: Use text instead of varchar(n) unless a strict limit is architecturally required.

  • JSON: Use jsonb (binary) for storage and indexing, not json .

  • Primary Keys: bigint GENERATED ALWAYS AS IDENTITY or uuid (v4/v7).

  1. Constraints & Integrity
  • Check Constraints: Use CHECK constraints generously (e.g., CHECK (price > 0) ).

  • Foreign Keys: Index all FK columns manually (Postgres does not auto-index them).

  • Exclusion Constraints: Use where UNIQUE is not enough (e.g., non-overlapping time ranges).

  1. Advanced Features
  • Triggers: Use for audit logs or complex data consistency that cannot be enforced by constraints.

  • Partitions: Consider declarative partitioning for massive time-series tables.

  • Enumerations: Use Native Enums for strict, infrequently changing sets; otherwise use a reference table.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

caddy-modern-config

No summary provided by upstream source.

Repository SourceNeeds Review
General

apache-lamp-config

No summary provided by upstream source.

Repository SourceNeeds Review
General

mysql-lamp-legacy

No summary provided by upstream source.

Repository SourceNeeds Review
General

postgresql-query-opt

No summary provided by upstream source.

Repository SourceNeeds Review