Performance
Postgres.js is designed to provide fast queries and optimized performance using native calls to PostgreSQL.
Lightweight
The library is lightweight, with minimal dependencies, which can lead to easier maintenance and deployment.
Asynchronous
It supports asynchronous operations using modern JavaScript Promise-based syntax, improving code readability and maintainability.
Support for PostgreSQL Features
It includes support for a wide range of PostgreSQL features such as transactions, streaming, and logical replication.
Community Support
Being an open-source project, it has community contributions and support, which can help in getting issues resolved and features updated.
Promote Postgres.js. You can add any of these badges on your website.
We have collected here some useful links to help you find out if Postgres.js is good.
Check the traffic stats of Postgres.js on SimilarWeb. The key metrics to look for are: monthly visits, average visit duration, pages per visit, and traffic by country. Moreoever, check the traffic sources. For example "Direct" traffic is a good sign.
Check the "Domain Rating" of Postgres.js on Ahrefs. The domain rating is a measure of the strength of a website's backlink profile on a scale from 0 to 100. It shows the strength of Postgres.js's backlink profile compared to the other websites. In most cases a domain rating of 60+ is considered good and 70+ is considered very good.
Check the "Domain Authority" of Postgres.js on MOZ. A website's domain authority (DA) is a search engine ranking score that predicts how well a website will rank on search engine result pages (SERPs). It is based on a 100-point logarithmic scale, with higher scores corresponding to a greater likelihood of ranking. This is another useful metric to check if a website is good.
The latest comments about Postgres.js on Reddit. This can help you find out how popualr the product is and what people think about it.
> What are you missing? Everything else needed to make a backend app. At the very least, Node should provide fundamental pieces like database drivers. Currently the best PG driver[1] depends on a single guy. Bun already provides 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. - Source: Hacker News / about 2 months ago
I want to use this as a chance to bring attention to a GitHub issue that I think would help reduce friction for Neon: https://github.com/neondatabase/neon/issues/4989. Having run a local dev environment connected to Neon and tests connected to Neon got in our way of adoption. We'd prefer to develop and run tests against a regular Postgres localhost database. To the PMs of Neon, put yourself in the shoes of a new... - Source: Hacker News / over 1 year ago
I'd push you to consider using postgres, slonik or similar for database queries. With these libraries, you just write SQL, but they perform input sanitization for you. So you can safely write:. Source: almost 2 years ago
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. - Source: Hacker News / almost 2 years ago
When viewed as a DSL for set theory, views, CTEs, set-returning functions, et al are indeed proper first-class query abstractions. When viewed through the lens of general purpose imperative or functional programming languages, it's easy to see how it can be seen as falling short. I'll admit much of the tooling and driver APIs leave a lot to be desired. Some tools do make good efforts though such as nested... - Source: Hacker News / about 2 years ago
Demonstrate how easily and accidentally one can make an SQL injection with these: https://github.com/porsager/postgres. - Source: Hacker News / over 2 years ago
In NodeJS land this library is pretty close to this: https://github.com/porsager/postgres. - Source: Hacker News / over 2 years ago
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. - Source: Hacker News / over 2 years ago
I'm using Supabase as my database, with RLS turned on. I query the DB from a Node backend using the postgres.js client (it could be any other JS client really). As such I'm connecting direct with the default postgres user and I issue raw SQL queries. Source: over 2 years ago
About a year ago I moved to raw SQL using Postgres.js. Honestly I thought it would be traumatic but it's been great so far. Source: almost 3 years ago
Worse: Ecosystem Better: Seamless TypeScript support without having to deal with 3rd party packages or tsconfigs. A standard library modeled after Go's that is a WIP, but solid overall. Having browser APIs in the runtime is great, removes the mental context switch between browser/node. Formatter built in to the binary. YMMV, but I prefer the url imports and lack of package.json. I can't speak from a professional... - Source: Hacker News / about 3 years ago
Not sure about ORM, but Postgres.js[0] 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. - Source: Hacker News / over 3 years ago
>Same deal with Postgres. `pg` would not compile at all. Knex also didn't work (this was an older project). You should take a look at Postgres.js [0] which supports Deno and TypeScript. Version 3.x was released recently and discussed in this HN thread [1]. [0] https://github.com/porsager/postgres. - Source: Hacker News / over 3 years ago
I am using postgres.js in my webapp and wondering if I still need the M in MVC. Source: over 3 years ago
Https://github.com/porsager/postgres More features, much bigger community involvement. Source: over 3 years ago
Something to note about the benchmarks hosted on https://github.com/porsager/postgres, is that the author is benchmarking the latest version of postgres against old versions of libraries (e.g. Slonik v23.5.5, vs the current v27.1.1). Source: over 3 years ago
Hi everyone. Just released Postgres.js v3 today.https://github.com/porsager/postgres / npm install postgresA bit more than two years ago I released the first version of Postgres.js. A fully functional PostgreSQL driver for Node.js written as a learning experience out of curiosity and annoyance with the current options. It greatly outperformed the alternatives[1] using pipelining and prepared statements, while... Source: over 3 years ago
Thanks a lot! What a coincidence - and perfect timing since v3 supports .raw()[1] to receive results as arrays. I'd also be very curious to hear how replacing pg goes :) And also good job on Imba! I'm a really big fan of stripping syntax down to the bare essentials, and what you've done with Imba is really impressive! [1] https://github.com/porsager/postgres#raw. - Source: Hacker News / over 3 years ago
Hi everyone. Just released Postgres.js v3 today.https://github.com/porsager/postgres / npm install postgresA bit more than two years ago I released the first version of Postgres.js. A fully functional PostgreSQL driver for Node.js written as a learning experience out of curiosity and annoyance with the current options. It greatly outperformed the alternatives[1] using pipelining and prepared statements, while... Source: over 3 years ago
It greatly outperformed the alternatives[1] using pipelining and prepared statements, while providing a much better development experience safe from SQL injections. Since then I've been busy building things using it, now running in production, and although quite delayed I'm so happy to release a new major today with some really exciting new features: 1. Realtime subscribe to changes through Logical Replication [2]... - Source: Hacker News / over 3 years ago
I prefer the postgres module. 0 dependencies. Easy to use API. Wicked fast. Also really hard to fall victim to SQL injection attacks unless you actually put some extra effort into doing something foolish. https://github.com/porsager/postgres#readme. - Source: Hacker News / over 4 years ago
Do you know an article comparing Postgres.js to other products?
Suggest a link to a post with product alternatives.
Is Postgres.js good? This is an informative page that will help you find out. Moreover, you can review and discuss Postgres.js here. The primary details have not been verified within the last quarter, and they might be outdated. If you think we are missing something, please use the means on this page to comment or suggest changes. All reviews and comments are highly encouranged and appreciated as they help everyone in the community to make an informed choice. Please always be kind and objective when evaluating a product and sharing your opinion.