node-postgres icon indicating copy to clipboard operation
node-postgres copied to clipboard

Support streaming with pg-native

Open segevfiner opened this issue 2 months ago • 2 comments

pg-query-strream is not currently supported when using pg-native, which means you can't stream large results sets when using it, it should be supported. libpg does have interfaces to "stream" results https://www.postgresql.org/docs/current/libpq-single-row-mode.html, so it should be possible.

From https://github.com/knex/knex/issues/6295

segevfiner avatar Oct 22 '25 11:10 segevfiner

Not the same type of streaming: pg-query-stream uses cursors.

charmander avatar Oct 23 '25 04:10 charmander

Protocol level streaming is still better then no streaming. What's actually missing from libpq for cursors?

segevfiner avatar Oct 23 '25 05:10 segevfiner