node package manager


High level shortcut to a readable query result stream for PostgreSQL


Quick helper for streaming query results from postgres. It will connect to postgres using node-postgres and environment variables After connecting, it will execute a streaming query, return the stream, and automatically close the connection to the server when the stream ends.

$ npm install pg-readable
var readable = require('pg-readable')
var stream = readable('SELECT * FROM my_big_table')
stream.pipe(/* bla bla bla */)