[Framework examples →](../)

# PostgreSQL data loader

View live: <https://observablehq.observablehq.cloud/framework-example-loader-postgres/>

This Observable Framework example demonstrates how to write a TypeScript data loader that runs a query on a PostgreSQL database using [Postgres.js](https://github.com/porsager/postgres). The data loader lives in [`src/data/edits.csv.ts`](./src/data/edits.csv.ts) and uses the helper [`src/data/postgres.ts`](./src/data/postgres.ts).
