Skip to content

Set database on socket string connection - #487

Merged
brianc merged 1 commit into
brianc:masterfrom
aurium:master
Dec 20, 2013
Merged

Set database on socket string connection#487
brianc merged 1 commit into
brianc:masterfrom
aurium:master

Conversation

@aurium

@aurium aurium commented Dec 19, 2013

Copy link
Copy Markdown
Contributor

Allows to connect to a specific database trough this ways:

pg.connect('/some/path database', callback);
pg.connect('socket:/some/path?db=database', callback)
pg.connect('socket:/some/path?db=database&encoding=utf8', callback)

Closes issue 484

Allows to conect to a specific database trough this ways:
pg.connect('/some/path database', callback);
pg.connect('socket:/some/path?db=database', callback)
pg.connect('socket:/some/path?db=database&encoding=utf8', callback)
@aurium

aurium commented Dec 19, 2013

Copy link
Copy Markdown
Contributor Author

PS: i'm using this modification to have the same js code connecting on heroku pg and on my local system pg, using a socket string from env var, with a specific db name on my local system.

@aurium

aurium commented Dec 19, 2013

Copy link
Copy Markdown
Contributor Author

TODO: after merge, may be good to add information on pg.connect() documentation at the wiki.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bonus points for this!

@brianc

brianc commented Dec 20, 2013

Copy link
Copy Markdown
Owner

This is a great pull request. If you have anything else you'd like to add or change, please feel free. 😄

👍 thank you so much! 🙆‍♀️

Going to run my local test suite, merge it, document the change in the changelog, and bump the minor version.

brianc added a commit that referenced this pull request Dec 20, 2013
Set database on socket string connection
@brianc
brianc merged commit aa32992 into brianc:master Dec 20, 2013
@aurium

aurium commented Dec 20, 2013

Copy link
Copy Markdown
Contributor Author

Nice! 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Set database on socket string connection

2 participants