porsager/postgres
View on GitHub ↗ ★ 8,742 JavaScript
Postgres.js - The Fastest full featured PostgreSQL client
48 mentions on Hacker News by 25 people: 3 stories, 45 comments · first 2019-12-23 · latest 2026-03-17
20082026
-
…better and has zero deps but mostly depends on a single guy. [1] https://npmgraph.js.org/?q=pg [2] https://github.com/porsager/postgres
comment by pier25 · 2026-03-17 · in Node.js needs a virtual file system -
Is there a way to make this work with https://github.com/porsager/postgres ? It's very close to raw SQL but with safe substitutions. I use it with Zod, but it would be great to have the types derived automatically.
comment by afidrya · 2026-02-17 · in Show HN: Pg-typesafe – Strongly typed queries for PostgreSQL and TypeScript -
…we have like tracing/APM, and then also admittedly esoteric topics like this stack trace fixing: https://github.com/porsager/postgres/issues/963#issuecomment... Fwiw I definitely sympathize with issue triage being time-consuming/sometimes…
comment by stephen · 2025-10-12 · in Pipelining in psql (PostgreSQL 18) -
…yet, instead this "didn't quite hit mainstream adoption and now the author is AWOL" driver does: https://github.com/porsager/postgres I've got a branch to convert our TypeScript ORM to postgres.js solely for this "send all our…
comment by stephen · 2025-10-12 · in Pipelining in psql (PostgreSQL 18) -
…its own PG driver [2] and Jarred has written they will keep investing into more built-in APIs. [1] https://github.com/porsager/postgres [2] https://bun.com/docs/api/sql
comment by pier25 · 2025-08-18 · in Node.js is able to execute TypeScript files without additional configuration -
…you know when it's implemented or it's not possible with postgres.js when I get around to it. [1] https://github.com/porsager/postgres [2] https://github.com/litdb/litdb/discussions/categories/ideas
comment by mythz · 2024-12-06 · in Litdb – type safe SQL for JavaScript/TS -
…changing in the node ecosystem with projects like https://hono.dev/ (koa/express successor) and https://github.com/porsager/postgres having zero deps.
comment by hombre_fatal · 2024-11-19 · in The tragedy of running an old Node project -
…Examples: - slonik: https://github.com/gajus/slonik?tab=readme-ov-file#protectin... - postgres.js: https://github.com/porsager/postgres?tab=readme-ov-file#quer...
comment by hombre_fatal · 2024-08-10 · in PEP 750: Tag Strings for Writing Domain-Specific Languages -
…connection for listening per process. Listen/notify is also super useful with triggers. [1] https://github.com/porsager/postgres#listen--notify
comment by porsager · 2024-05-14 · in The notifier pattern for applications that use Postgres -
…and test experience would be easier. Perhaps Neon could swap to something like this internally: https://github.com/porsager/postgres . Having run a local dev environment connected to Neon and tests connected to Neon got in our way of…
comment by vendiddy · 2024-04-15 · in Neon Serverless Postgres is generally available -
…languages to be more amenable to seamless access of set-oriented data. More stuff like this: https://github.com/porsager/postgres https://github.com/launchbadge/sqlx
comment by ttfkam · 2024-02-19 · in Show HN: PRQL in PostgreSQL -
…}); }); export { router as routes }; For database I use the postgres.js library which is super nice https://github.com/porsager/postgres examples from postgres.js front page: import sql from './db.js' async function getUsersOver(age) {…
comment by andrewstuart · 2024-01-25 · in Lightweight JavaScript Framework Review (For Django Developers) -
…) - PostgreSQL database server - Postgres.js - PostgreSQL client for Node.js ( https://github.com/porsager/postgres ) - Migration powered by graphile-migrate ( https://github.com/graphile/migrate ) - PostgreSQL Row-Level Security ( https
comment by stephane-klein · 2023-10-30 · in Ask HN: If you were to build a web app today what tech stack would you choose? -
Thanks Pier! Your comment saved me some frustration here :-D https://github.com/porsager/postgres/discussions/627#discuss...
comment by porsager · 2023-10-14 · in PostgresJs: PostgreSQL client for Node.js and Deno -
…himself: > it seems Postgres.js is actually faster than, not only pg, but of any driver out-there - https://github.com/porsager/postgres/discussions/627 - https://porsager.github.io/imdbench/sql.html
comment by joshxyz · 2023-10-14 · in PostgresJs: PostgreSQL client for Node.js and Deno -
…named prepared statements can be disabled by setting "prepare" to false in the connection settings: https://github.com/porsager/postgres#connection-details
comment by fauigerzigerk · 2023-10-14 · in PostgresJs: PostgreSQL client for Node.js and Deno -
…where the parse/describe/bind/execute/sync data is created is, in my opinion, pretty bad code: https://github.com/porsager/postgres/blob/bf082a5c0ffe214924...
comment by latch · 2023-10-14 · in PostgresJs: PostgreSQL client for Node.js and Deno -
…himself: > it seems Postgres.js is actually faster than, not only pg, but of any driver out-there - https://github.com/porsager/postgres/discussions/627 - https://porsager.github.io/imdbench/sql.html
comment by joshxyz · 2023-10-10 · in We migrated to SQL. Our biggest learning? Don't use Prisma ORM -
…that try to do things in a sane way without wasting your time. Postgres.js [1] is one of them. [1] https://github.com/porsager/postgres
comment by keb_ · 2023-10-09 · in We migrated to SQL. Our biggest learning? Don't use Prisma ORM -
there's also https://kysely.dev/ but personally i handwrite my queries with https://github.com/porsager/postgres for flexibility and performance most orms use node-pg lib which has shit performance.
comment by joshxyz · 2023-10-08 · in We migrated to SQL. Our biggest learning? Don't use Prisma ORM -
…lot to be desired. Some tools do make good efforts though such as nested fragments in this driver. https://github.com/porsager/postgres#building-queries
comment by ttfkam · 2023-09-17 · in Relational is more than SQL -
…multitude of "ORMs are bad" articles / discussions. For instance - I would love to be able to use https://github.com/porsager/postgres with sqlite.
comment by porsager · 2023-07-04 · in SQLite-based databases on the Postgres protocol? Yes we can -
Demonstrate how easily and accidentally one can make an SQL injection with these: https://github.com/porsager/postgres https://github.com/gajus/slonik
comment by ttfkam · 2023-06-29 · in Is ORM still an anti-pattern? -
Agreed! First time I used the postgres Node library [0], I was sold! [0] https://github.com/porsager/postgres
comment by ttfkam · 2023-06-29 · in Is ORM still an anti-pattern? -
I recently discovered https://github.com/porsager/postgres I think this is how an ORM for SQL databases should be. Unfortunately I don't use Node on the backend (Rails, Django, Phoenix) but I wish there would be ORMs like that for those…
comment by pmontra · 2023-06-28 · in Is ORM still an anti-pattern? -
In NodeJS land this library is pretty close to this: https://github.com/porsager/postgres
comment by alemanek · 2023-06-21 · in Show HN: Kysely, a type-safe SQL query builder for TypeScript -
It's JS with the wonderful Postgres.js package! [1] https://github.com/porsager/postgres Here's an example where it really shines: const users = [ { name: 'Murray', age: 68 }, { name: 'Walter', age: 80 }, ]; await sql`insert into users ${…
comment by surprisetalk · 2023-06-19 · in IKEA-Oriented Development -
They've looked at Postgres.js ( https://github.com/porsager/postgres ) before — wouldn't mind if they enabled those other cases in the same way. Also, node-postgres is ripe for sql injections because you just concatenate strings yourself…
comment by porsager · 2023-05-01 · in Storage on Vercel -
…was a breeze. I also think it's a great starting point for anyone looking to learn JavaScript. [0] https://github.com/porsager/postgres
comment by keb_ · 2022-09-29 · in Deno 1.26 Release Notes -
…works on Deno. For testing, Deno includes a built-in test runner and assertions via the std[1]. [0] https://github.com/porsager/postgres [1] https://deno.land/manual/testing
comment by kevinfiol · 2022-06-28 · in Fresh is a new full stack web framework for Deno -
…client is implemented in JavaScript. Queries can be written using JavaScript template literals. [0] https://github.com/porsager/postgres [1] https://news.ycombinator.com/item?id=30794332
comment by tauchunfall · 2022-05-11 · in Deno.js in production -
…understand, but RDS Proxy would just hang until this was changed to UTF8 (uppercase with no dash). https://github.com/porsager/postgres/issues/288
comment by porsager · 2022-04-02 · in Show HN: Postgres.js – Fastest Full-Featured PostgreSQL Client for Node and Deno -
Tbh I think this is quite risky to mess it up. Using a simple regex to convert… https://github.com/porsager/postgres/blob/master/transpile.c...
comment by ttty · 2022-03-25 · in Show HN: Postgres.js – Fastest Full-Featured PostgreSQL Client for Node and Deno -
…dependencies. Even transpilation from ES modules into commonjs is done by the author himself: https://github.com/porsager/postgres/blob/master/transpile.c... I’m not sure if I’d made the same choice, but it’s fun the see it can work out…
comment by kamilafsar · 2022-03-25 · in Show HN: Postgres.js – Fastest Full-Featured PostgreSQL Client for Node and Deno -
I hit a small type issue migrating from v2 to v3 that's not listed in the migration: https://github.com/porsager/postgres/issues/283
comment by jadbox · 2022-03-24 · in Show HN: Postgres.js – Fastest Full-Featured PostgreSQL Client for Node and Deno -
…chance of SQL injection[2]. [1] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe... [2] https://github.com/porsager/postgres#await-sql---result
comment by porsager · 2022-03-24 · in Show HN: Postgres.js – Fastest Full-Featured PostgreSQL Client for Node and Deno -
…syntax down to the bare essentials, and what you've done with Imba is really impressive! [1] https://github.com/porsager/postgres#raw
comment by porsager · 2022-03-24 · in Show HN: Postgres.js – Fastest Full-Featured PostgreSQL Client for Node and Deno -
…handling for large scale use, cancellation of requests, Typescript suport, async cursors. [1] https://github.com/porsager/postgres-benchmarks#results [2] https://github.com/porsager/postgres#realtime-subscribe [3]…
comment by porsager · 2022-03-24 · in Show HN: Postgres.js – Fastest Full-Featured PostgreSQL Client for Node and Deno -
…and that helpers for different things all are sql(something) while doing very different things. https://github.com/porsager/postgres/blob/master/lib/index.j... I also tend to compose queries out of smaller static parts dynamically, and…
comment by megous · 2021-05-20 · in Ask HN: What are some tools / libraries you built yourself? -
…the goto node driver tolerable to work with. In the process I made it 4-5 times faster as well. https://github.com/porsager/postgres
comment by porsager · 2021-05-16 · in Ask HN: What are some tools / libraries you built yourself? -
Anyone know how this compares to porsager's "postgres" lib? https://github.com/porsager/postgres
comment by joshxyz · 2021-03-11 · in Slonik: A PostgreSQL client with strict types, detailed logging, and assertions -
the template syntax reminds me of an other postgres libary https://github.com/porsager/postgres
comment by LorenzA · 2020-09-03 · in Show HN: ORM for TypeScript with no query-builder, supporting full SQL queries -
Yes you should be able to model that using `.begin()` and `.savepoint()` within. https://github.com/porsager/postgres#savepoint-sqlsavepointn... Is that what you're looking for?
comment by porsager · 2019-12-25 · in Show HN: Postgres.js – Fast PostgreSQL Client for Node.js