> ## Documentation Index
> Fetch the complete documentation index at: https://012e27a-docs-2.manicule.dev/llms.txt
> Use this file to discover all available pages before exploring further.
> For every page in one file, fetch https://012e27a-docs-2.manicule.dev/llms-full.txt (large).
> To search and read these docs as tools, connect the MCP server at https://012e27a-docs-2.manicule.dev/api/mcp.
> Every agent surface: https://012e27a-docs-2.manicule.dev/.well-known/llms-manifest.json

# Neon Serverless Postgres (/databases/neon-postgres)

<!-- agent-signals: reading_time_min: 1 · est_tokens: 250 · updated: 2026-11-12 -->
Related: [Managed Databases & Storage](/databases/overview.md), [Cloudflare D1 (Edge SQLite)](/databases/cloudflare-d1.md), [Supabase Managed Postgres](/databases/supabase-postgres.md), [Database Migrations & ORM Setup](/databases/migrations.md)

> Postgres with compute and storage separated, instant branching, and scale to zero.

**Neon** is a serverless PostgreSQL database with compute and storage separated.

## Highlights

* **Database branching**: create isolated database branches that mirror Git branches — test
  schema changes on a copy without touching production data.
* **Autoscaling and scale to zero**: compute scales up under load and to zero when idle.
* **Postgres extensions**: `pgvector`, `uuid-ossp`, `pg_trgm`, and the rest of the standard set.

```ts title="lib/db.ts"
import { neon } from "@neondatabase/serverless";

const sql = neon(process.env.DATABASE_URL!);

export async function getActiveUsers() {
  return await sql`SELECT id, name, email FROM users WHERE active = true`;
}
```

<Tip title="Branch per preview">Pair a Neon branch with each preview deployment so reviews never share a database.</Tip>

Provision it from the [Neon connector](/connectors/neon) or select **Neon Postgres** in the
Databases drawer.
