Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connection example using /var/run/postgres #30

Closed
fergusg opened this issue Apr 30, 2011 · 1 comment
Closed

Connection example using /var/run/postgres #30

fergusg opened this issue Apr 30, 2011 · 1 comment

Comments

@fergusg
Copy link

fergusg commented Apr 30, 2011

I can connect with "tcp://username:password@localhost/cdbname" but I'd rather use /var/run/postgres (unless there's another way to avoid supplying a password). However:

var pg = require('pg').native;
var client = new pg.Client("/var/run/postgres");
client.connect();

throws:

Error: Need to use node to do async DNS on host
    at /usr/local/lib/node/.npm/pg/0.4.0/package/lib/native.js:29:15
    at Connection.connect (/usr/local/lib/node/.npm/pg/0.4.0/package/lib/native.js:43:3)

Any suggestions?

@fergusg fergusg closed this as completed Apr 30, 2011
@fergusg fergusg reopened this Apr 30, 2011
@fergusg
Copy link
Author

fergusg commented Apr 30, 2011

It was a typo /var/run/postgresQL - the error message threw me.

@fergusg fergusg closed this as completed Apr 30, 2011
brianc added a commit that referenced this issue Dec 18, 2019
Add support for rowMode & custom types
brianc pushed a commit that referenced this issue Apr 28, 2020
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

No branches or pull requests

1 participant