node-postgres vs pg-promise for Nodejs Application

Abdisamad Khalif picture Abdisamad Khalif · Oct 24, 2016 · Viewed 7.3k times · Source

I'm going to build a Nodejs application with Postgresql as back end. I'm not going to use ORMs like Sequelize due to poor documentation and performance problems or any other ORM - ORM is an anti-pattern.

I found node-postgres and pg-promise are candidates in this regard. So, can anyone clarify the scenarios which one of the tools is better than the other or which one is way to go with description, provided that node-postgres has been developing since 2010 and pg-promise since 2015.

Answer

brianc picture brianc · Oct 24, 2016

pg-promise uses node-postgres internally. AFAIK pg-promise is a promise-based set of higher-level APIs on top that you might find useful. I'd recommend using whichever you feel more comfortable with. I'm the author of node-postgres.