Native bindings support
danistefanovic opened this issue · 5 comments
danistefanovic commented
Suor commented
How do you propose making this to work? Always try pg-native
first, then pg
? Look for some env var? Change .configure()
signature to accept some flag?
danistefanovic commented
I would try something like this: Use pg-native
if available, or else fall back to pg
.
try {
return require('pg').native;
} catch (e) {
return require('pg');
}
What do you prefer?
Suor commented
Simple fallback doesn't work at this stage, see brianc/node-postgres#940, will wait for Brians response.
coagmano commented
I've noticed pg
and pg-native
differ on a couple of things and aren't always kept in sync, so I'd prefer only using pg-native
by explicit choice of the consumer