Fix client_encoding setting to support pg_bouncer when using libpq (#270)

This commit is contained in:
Hebo 2013-05-21 14:37:06 -07:00
parent aeda9dab50
commit 323a2f9f49

View File

@ -61,7 +61,7 @@ ConnectionParameters.prototype.getLibpqConnectionString = function(cb) {
params.push("host=" + this.host); params.push("host=" + this.host);
return cb(null, params.join(' ')); return cb(null, params.join(' '));
} }
params.push("options=--client_encoding='utf-8'"); params.push("client_encoding='utf-8'");
dns.lookup(this.host, function(err, address) { dns.lookup(this.host, function(err, address) {
if(err) return cb(err, null); if(err) return cb(err, null);
params.push("hostaddr=" + address); params.push("hostaddr=" + address);