pg-typesafe
github.com · Package · Maintained
Strongly typed raw SQL queries for PostgreSQL in TypeScript
- Data & databases
- Package
- TypeScript
- Day-7 check
- Day-30 check
- postgresql
- typescript
- sql
- typed sql typescript
- postgres typescript types
- raw sql typescript
- pg typed queries
- postgresql type generation
- Stars
- 104
- Forks
- 1
- Open issues
- 0
- Last commit
- Found
- 9 months ago
GitHub figures as of . They are context, not a ranking.
pg-typesafe lets you write raw SQL and get fully typed results, with the same calling style as node-pg. It handles details such as nullable columns and how INT8 values are returned, and it suits TypeScript developers who prefer raw SQL.
Repository description on GitHub: “Strongly typed queries for PostgreSQL and TypeScript”
What it does
- Generates TypeScript types for raw SQL queries against PostgreSQL
- Same calling style as node-pg with typed rows and parameters
- Handles nullable columns and how INT8 values are returned
- No runtime dependencies
Good for
- Get typed query results while keeping raw SQL in TypeScript
- Generate typed query definitions from a live PostgreSQL database
Suits: TypeScript developers who prefer writing raw SQL.
Worth knowing: Only queries with constant SQL strings can be typed, because dynamic queries cannot be analyzed.
What you can try
Read the README on GitHub and install from source.
Install
npx pg-typesafeConfirmed against the package registry. Read the project’s own instructions before running anything.
Links go to third-party sites KipFound does not control. KipFound has not installed, audited or tested this software.
Found vs. released
Kip first saw pg-typesafe on , when n_e posted it to Show HN. GitHub listed no published releases for n-e/pg-typesafe when checked , so the project may ship straight from its main branch. The repository was created .
Day-7 and day-30 updates
Day 7 no new release
- No tagged release was published in the first 7 days after it was found (GitHub release dates).
- Show HN discussion at check time: 69 points, 34 comments. API record
Checked , later than day 7 because tracking began after.
Day 30 no new release
- No tagged release was published in the first 30 days after it was found (GitHub release dates).
- Show HN discussion at check time: 69 points, 34 comments. API record
Checked , later than day 30 because tracking began after.
Release timeline every entry links to its source
- Repository created on GitHub: n-e/pg-typesafe
- Found: n_e posted it to Show HN. Show HN
- Day-7 check recorded by Kip (details)
- Day-30 check recorded by Kip (details)
Quick answers
- When was pg-typesafe released?
- No dated release record is available. Kip found it on Show HN on 17 Feb 2026.
- Is pg-typesafe open source?
- Its source is public on GitHub at n-e/pg-typesafe under the GPL-3.0 licence.
- What does pg-typesafe run on?
- Command line, Library.
- Is pg-typesafe free?
- It is open source, so the code is free to read and run; check the licence for terms.
- Is pg-typesafe still maintained?
- It had a commit or release in the last year, though not in the last 90 days, as of the latest check.
Provenance
| Source | Record | Last checked |
|---|---|---|
| Show HN | listing official API record | |
| GitHub repository | n-e/pg-typesafe REST API record | |
| GitHub Releases | release list REST API record |
Stable ID hn-47050872. Summary drafted with AI from the source records above and checked against KipFound’s rules before publishing. Dates and release facts come only from those records.
Share
Similar tools
Made this, or spotted a mistake? Ask for a correction or removal. No account or email address needed.