PostgreSQL taste

By Fatih Kadir Akın (profile) · From prompts.chat · License: CC0 1.0 · Added October 28, 2026

# PostgreSQL taste of a backend engineer
- Use bigint identity columns (GENERATED ALWAYS AS IDENTITY) for primary keys; reach for UUIDv7 only when ids must be generated outside the database. Confidence: 0.80
- Store timestamps as timestamptz in UTC, never timestamp without time zone. Confidence: 0.95
- Use text with a CHECK constraint instead of varchar(n) for length limits. Confidence: 0.80
- Store money as numeric or as integer minor units, never as float. Confidence: 0.95
- Name tables in plural snake_case and foreign keys as <singular>_id. Confidence: 0.70
- Declare NOT NULL by default and allow NULL only when "unknown" is a real state. Confidence: 0.85
- Enforce invariants in the database with foreign keys, UNIQUE, and CHECK constraints, not only in application code. Confidence: 0.90
- Index every foreign key column that is used in joins or cascading deletes. Confidence: 0.85
- Read EXPLAIN (ANALYZE, BUFFERS) before adding an index, and again after to prove it helped. Confidence: 0.90
- Prefer partial and expression indexes over wide composite indexes for skewed filters. Confidence: 0.70
- Create indexes on large tables with CREATE INDEX CONCURRENTLY. Confidence: 0.90
- Use jsonb for genuinely schemaless attributes, but promote fields you filter on into real columns. Confidence: 0.80
- Paginate with keyset (WHERE id > $last ORDER BY id LIMIT n) instead of large OFFSET values. Confidence: 0.85
- Keep transactions short and never hold one open across a network call. Confidence: 0.90
- Set statement_timeout and idle_in_transaction_session_timeout per application role. Confidence: 0.85
- Put a connection pooler such as PgBouncer in transaction mode in front of the database. Confidence: 0.80
- Use SELECT ... FOR UPDATE SKIP LOCKED for simple job queues before adding a separate broker. Confidence: 0.70
- Use INSERT ... ON CONFLICT for idempotent upserts. Confidence: 0.85
- Give each service its own role with least privilege; the application never connects as a superuser. Confidence: 0.90
- Turn on pg_stat_statements and review the slowest queries every week. Confidence: 0.85
- Write CTEs for readability, knowing Postgres 12+ inlines them unless you add MATERIALIZED. Confidence: 0.65
- Test point-in-time recovery from backups regularly; an untested backup does not count. Confidence: 0.95

Fill in anything in [brackets] or {braces} with your own details first.

This is my prompt

Wrote this prompt? Tell me, and I will put your name on it. I check every claim by hand.

Report or remove
What is wrong?

More Everything else prompts

Everything else

Web Performance taste

Web performance taste of a frontend engineer - Measure Core Web Vitals (LCP, INP, CLS) from real users, not only from lab Lighthouse runs.

You need: any AI chat (ChatGPT, Claude or Grok Bot)

By Fatih Kadir Akın

Everything else

Shell Scripting taste

Shell scripting taste of a DevOps engineer - Start every script with !/usr/bin/env bash and set -euo pipefail.

You need: any AI chat (ChatGPT, Claude or Grok Bot)

By Fatih Kadir Akın

Everything else

Clone

Clone the LaunchMe notch A–Z with pixel-accurate visuals and behavior.

You need: any AI chat (ChatGPT, Claude or Grok Bot)

By prompts.chat community

Everything else

Basecamp cheatsheet

Generate a single-page, print-optimized cheat sheet + pocket reference card for Basecamp + the official Basecamp CLI (basecamp).

You need: any AI chat (ChatGPT, Claude or Grok Bot)

By prompts.chat community

Everything else

Restaurant Menu Allergen Matrix Builder (JSON)

{ "role": "Food safety consultant who builds clear, auditable allergen information for small restaurants and cafes", "task": "Turn my menu and recipe notes into a single strict JSON allergen package: a dish-by-allergen...

You need: any AI chat (ChatGPT, Claude or Grok Bot)

By Fatih Kadir Akın

All Everything else promptsAll prompts

Want a prompt for your own work? Ask for one. Every prompt here is free.

Want this built for you? Get it built.