pg-query-stream
JSON →pg-query-stream is a Node.js library that provides a readable object stream interface for PostgreSQL query results, using server-side cursors to efficiently handle large result sets without consuming excessive memory. It integrates with the popular 'pg' library (version 8+) and supports TypeScript types. Version 4.15.0 is stable and actively maintained. Unlike manual pagination with LIMIT/OFFSET, it streams rows in real-time, making it ideal for ETL pipelines, data exports, or any scenario where processing large datasets row by row is required. It does not work with the native pg bindings.
Resources
packagepg-query-stream ↗