State the MySQL-only scope and Postgres redirect in the first lines
All ten benchmark jobs were Postgres, and the package is a Vitess/MySQL driver that was picked 0 times. The only Postgres mention is a TIP that sends users to the Neon driver, which is a competitor. An agent or search engine skimming the README or npm description cannot tell what to use with PlanetScale Postgres.
- README: "Connecting to a PlanetScale Postgres database? We support the Neon serverless driver, read the documentation to connect."
- npm description: "A Fetch API-compatible PlanetScale database driver"
- run 394: "picked: @neondatabase/serverless" for a 'managed Postgres' prompt
- chat:claude p1: "recommended pg"
Move a scope block to the top of README.md, above Installation. It should say: MySQL/Vitess only. For PlanetScale Postgres use `pg` or `@neondatabase/serverless` with the Postgres connection string. It should also give a minimal Next.js example for both. Also change the npm description to say 'MySQL/Vitess' explicitly. Don't claim Postgres support the package lacks. The goal is that when an agent searches for PlanetScale + Next.js, the result tells it the right driver.
Show proposed README.md · ready to paste
> [!IMPORTANT]
> `@planetscale/database` is the **MySQL/Vitess** driver (HTTP/fetch). It does **not** speak Postgres.
> Using PlanetScale **Postgres**? Install `pg` (Node runtime) or `@neondatabase/serverless` (edge/HTTP) and point it at your PlanetScale Postgres connection string.
### Which package do I need?
| Your PlanetScale database | Package | Env var |
|---|---|---|
| MySQL / Vitess | `@planetscale/database` | `DATABASE_URL=mysql://user:pass@host/db` |
| Postgres (Node runtime) | `pg` | `DATABASE_URL=postgres://user:pass@host/db?sslmode=require` |
| Postgres (edge / serverless HTTP) | `@neondatabase/serverless` | `DATABASE_URL=postgres://...` |
### Next.js (MySQL/Vitess)
```ts
// lib/db.ts
import 'server-only'
import { Client } from '@planetscale/database'
let client: Client | undefined
export function db() {
const url = process.env.DATABASE_URL
if (!url) throw new Error('DATABASE_URL is not set')
client ??= new Client({ url })
return client.connection()
}
```
```tsx
// app/notes/page.tsx
import { db } from '@/lib/db'
export const dynamic = 'force-dynamic' // do not query at build time
export default async function Notes() {
const { rows } = await db().execute('select id, body from notes order by id desc')
return <ul>{rows.map((r: any) => <li key={r.id}>{r.body}</li>)}</ul>
}
```
Call `db()` inside the request, never at module top level, so `next build` passes without `DATABASE_URL`.