brianc / node-pg-native

Native (C/C++) bindings to PostgreSQL with sync and async options.
247 stars 44 forks source link

Support for new libpq pipeline mode #100

Open lrowe opened 3 years ago

lrowe commented 3 years ago

Postgres 14 added support for pipeline mode to libpq. "You can use it on old PostgreSQL versions so long as you're using a new libpq."

This seems like it would be very helpful for async Node applications allowing one to easily send all needed queries from an iteration of the event loop in one go. To achieve this currently I need to combine all the various queries I use into a single complex query (UNION ALL with an extra column identifying which of the combined queries the result is for.)