SQLAlchemy + Postgres Cheatsheet 01 — asyncpg / psycopg Setup

Cheatsheet: driver selection, connection settings, PgBouncer-friendly config, RDS / Cloud SQL specifics.

May 13, 2026 · 2 min · 416 words · Manvendra Rajpoot

Postgres SQLAlchemy Textbook Ch. 1 — Dialects, asyncpg vs psycopg, and Postgres Setup

Postgres-focused SQLAlchemy: asyncpg vs psycopg v3, connect_args, server settings, dialect specifics, and choosing your driver.

May 8, 2026 · 3 min · 617 words · Manvendra Rajpoot

SQLAlchemy + Postgres Cheatsheet 02 — JSONB Patterns

Cheatsheet: JSONB column, containment, path access, GIN index, jsonb_set, ON CONFLICT updates.

May 13, 2026 · 3 min · 475 words · Manvendra Rajpoot

Postgres SQLAlchemy Textbook Ch. 2 — JSONB, Arrays, Ranges, and Postgres-Specific Types

Postgres types in SQLAlchemy: JSONB queries, ARRAY operations, range types, citext, intervals, INET — with the dialect helpers.

May 8, 2026 · 4 min · 836 words · Manvendra Rajpoot

SQLAlchemy + Postgres Cheatsheet 03 — Arrays

Cheatsheet: ARRAY column, contains / overlaps / ANY, GIN index, append/remove operations.

May 13, 2026 · 2 min · 414 words · Manvendra Rajpoot

Postgres SQLAlchemy Textbook Ch. 3 — Postgres Indexes in SQLAlchemy

Postgres index types via SQLAlchemy: B-tree, GIN, GiST, BRIN, HASH, partial, expression, INCLUDE indexes, and concurrent creation.

May 8, 2026 · 4 min · 731 words · Manvendra Rajpoot

SQLAlchemy + Postgres Cheatsheet 04 — Ranges, INTERVAL, citext, INET

Cheatsheet: TSTZRANGE / NUMRANGE / DATERANGE, INTERVAL, citext, INET / CIDR, exclusion constraints.

May 13, 2026 · 3 min · 572 words · Manvendra Rajpoot

Postgres SQLAlchemy Textbook Ch. 4 — Full-Text Search

Practical full-text search in Postgres via SQLAlchemy: tsvector, GIN, websearch_to_tsquery, ranking, and stemming.

May 8, 2026 · 3 min · 562 words · Manvendra Rajpoot

Alembic Cheatsheet 05 — Online (Zero-Downtime) Schema Changes

Cheatsheet: expand-contract pattern, CONCURRENTLY index, FK validation in two phases, batched backfill.

May 15, 2026 · 3 min · 584 words · Manvendra Rajpoot

SQLAlchemy + Postgres Cheatsheet 05 — Indexes (B-tree, GIN, GiST, BRIN, HASH)

Cheatsheet: pick the right Postgres index type for your access pattern.

May 13, 2026 · 3 min · 571 words · Manvendra Rajpoot