Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Include port as a connection parameter for socket connections #604

Merged
merged 2 commits into from

2 participants

@markyen

Even when using a socket, sometimes the port needs to be something other than the default of 5432

@brianc
Owner

Great! Thank you. :+1:

@markyen

I fixed the travis build so the tests are now passing

@brianc brianc merged commit 8592be7 into brianc:master

1 check passed

Details continuous-integration/travis-ci The Travis CI build passed
@phated phated referenced this pull request from a commit in iceddev/pg-connection-string
@phated phated attach port always - ref brianc/node-postgres#604 df2a24c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jun 12, 2014
  1. @markyen
Commits on Jul 6, 2014
  1. @markyen

    Fixes travis build for 0.8

    markyen authored
This page is out of date. Refresh to see the latest.
Showing with 4 additions and 2 deletions.
  1. +2 −0  .travis.yml
  2. +2 −2 lib/connection-parameters.js
View
2  .travis.yml
@@ -4,3 +4,5 @@ node_js:
- "0.10"
before_script:
- node script/create-test-tables.js pg://postgres@127.0.0.1:5432/postgres
+before_install:
+ - npm install -g npm@~1.4.6
View
4 lib/connection-parameters.js
@@ -39,6 +39,7 @@ var parse = function(str) {
config.fallback_application_name = result.query.fallback_application_name;
}
+ config.port = result.port;
if(result.protocol == 'socket:') {
config.host = decodeURI(result.pathname);
config.database = result.query.db;
@@ -50,7 +51,6 @@ var parse = function(str) {
var auth = (result.auth || ':').split(':');
config.user = auth[0];
config.password = auth[1];
- config.port = result.port;
var ssl = result.query.ssl;
if (ssl === 'true' || ssl === '1') {
@@ -66,7 +66,7 @@ var useSsl = function() {
return false;
case "prefer":
case "require":
- case "verify-ca":
+ case "verify-ca":
case "verify-full":
return true;
}
Something went wrong with that request. Please try again.