fix it so passwordless connections work #77

Merged
merged 1 commit into from Oct 25, 2012

Projects

None yet

2 participants

@bjourne

...ementation. the connection string formatting is changed so that it is possible to connect to pg without supplying credentials over a domain socket

@bjourne bjourne use node-postgres "native" libpq api instead of the pure javascript i…
…mplementation. the connection string formatting is changed so that it is possible to connect to pg without supplying credentials over a domain socket
b3a9c66
@dresende
Owner

Could you just remove the console.log about the connection string?

@dresende dresende added a commit that referenced this pull request Oct 25, 2012
@dresende Merging #77 with some modifications
- removed console.log
- can't use native right now, there's no way to know if native is
installed (it doesn't work for me..)
baf7c54
@dresende dresende added a commit that referenced this pull request Oct 25, 2012
@dresende Merge branch 'pr/77'
* pr/77:
  Merging #77 with some modifications
  use node-postgres "native" libpq api instead of the pure javascript implementation. the connection string formatting is changed so that it is possible to connect to pg without supplying credentials over a domain socket
0eed10a
@dresende dresende merged commit b3a9c66 into dresende:master Oct 25, 2012
@dresende
Owner

If you know how to detect if pg.native works tell me. I know it's there but there's no flag or something to inform me I can use it. And it doesn't fallback either.

You can for now do:

var orm = require("orm");
var pg = require("pg").native;
var client = new pg.Client(....);

client.connect(function () {
    orm.connect(pg, function (_, db) {
        // ready!
        db.define(...);
    });
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment