# sqlc

20 Hacker News commenters recommended sqlc and 4 criticized it, November 2025 to November 2026. It was recommended in 9 of 13 months. It meets the Hacker Approved badge rule.

**Verdict:** Generates type-safe code from plain SQL queries, giving ORM-style convenience without ORM overhead. Critics say support for other languages lags behind Go and Postgres.

## Why people recommend it

- Type-safe code generated from SQL (5 comments): "It made most of the boilerplate of using plain SQL go away, I get type safe responses" ([source](https://news.ycombinator.com/item?id=47111727)) "so I never have any issues with SQL being wrong or out of sync with the data model" ([source](https://news.ycombinator.com/item?id=47788047)) "it produces models and repositories based on plain sql queries" ([source](https://news.ycombinator.com/item?id=48398201))
- Avoids ORM mechanisms and overhead (3 comments): "you avoid the many awkward mechanisms ORMs need to integrate SQLisms into the native language" ([source](https://news.ycombinator.com/item?id=45944543)) "better tools like sqlc etc that have orm ergonomics without the performance hit" ([source](https://news.ycombinator.com/item?id=46097005)) "cover most of the perceived advantages of ORMs, without the downsides" ([source](https://news.ycombinator.com/item?id=47110855))
- Removes boilerplate from plain SQL (2 comments): "It made most of the boilerplate of using plain SQL go away, I get type safe responses" ([source](https://news.ycombinator.com/item?id=47111727)) "it produces models and repositories based on plain sql queries" ([source](https://news.ycombinator.com/item?id=48398201))
- Flexible, you write exact queries (2 comments): "Writing queries in sql and then generating for the target language also provides a flexibility that has reduced rewrite cost." ([source](https://news.ycombinator.com/item?id=48460800)) "You specify just what you want from the database, without needing to couple so much API with database tables." ([source](https://news.ycombinator.com/item?id=47406835))

## What people warn about

- Weaker support for languages beyond Go (2 comments): "I love sqlc, but I think it's more fair to say it's an SQL code generator for Postgres and Go." ([source](https://news.ycombinator.com/item?id=48666344)) "support for other languages is not as great" ([source](https://news.ycombinator.com/item?id=48648638))
- Query placement and naming is cumbersome (2 comments): "it is a little cumbersome to add them to a different file and find a name for them" ([source](https://news.ycombinator.com/item?id=47054804)) "I don’t recall sqlc giving any solution to help with this." ([source](https://news.ycombinator.com/item?id=48917834))

## Alternatives hackers recommend

- [Ecto (Elixir)](https://hackerapproved.com/p/ecto.md): 17 recommend
- [sqlx](https://hackerapproved.com/p/sqlx.md): 13 recommend
- [jOOQ](https://hackerapproved.com/p/jooq.md): 13 recommend
- [Kysely](https://hackerapproved.com/p/kysely.md): 12 recommend
- [Jdbi](https://hackerapproved.com/p/jdbi.md): 6 recommend

## Cite as

Hacker Approved, "sqlc", https://hackerapproved.com/p/sqlc/ (counts from 1,795,640 Hacker News comments, November 2025 to November 2026).
