Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions packages/pg/lib/native/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ var Client = (module.exports = function (config) {
// keep these on the object for legacy reasons
// for the time being. TODO: deprecate all this jazz
var cp = (this.connectionParameters = new ConnectionParameters(config))
if (config.nativeConnectionString) cp.nativeConnectionString = config.nativeConnectionString
this.user = cp.user

// "hiding" the password so it doesn't show up in stack traces
Expand Down Expand Up @@ -84,6 +85,7 @@ Client.prototype._connect = function (cb) {

this.connectionParameters.getLibpqConnectionString(function (err, conString) {
if (err) return cb(err)
if (self.connectionParameters.nativeConnectionString) conString = self.connectionParameters.nativeConnectionString
self.native.connect(conString, function (err) {
if (err) {
self.native.end()
Expand Down