You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
node-postgres allows to connect using sockets in a connection string like this: pg.connect('/some/path', callback)
That is nice, but does not allows to set another database but one with the same user name.
I propose to accept a special protocol named socket to enable the database selection like this: pg.connect('socket:/some/path?database', callback)
The url.parse('socket:/some/path?database') returns:
That data is enough to make the magic, with a small change on function parse at connection-parameters.js. (and also my favorite solution)
That can not change the current behavior for sockets when the first char is "/".
I also try a change on current sockets behavior, splitting the string on spaces. That makes easy to set a database by this way: pg.connect('/some/path database', callback)
Activity
brianc commentedon Dec 19, 2013
I think that is awesome! 💃 If you code it & it is tested I will merge it! 👍
aurium commentedon Dec 19, 2013
Ok! Done! :-)
See pull request #487