JuliaDatabases / PostgreSQL.jl

DEPRECATED: use LibPQ.jl instead
https://github.com/invenia/LibPQ.jl
Other
60 stars 39 forks source link

Connection authentication #41

Open randomizedthinking opened 8 years ago

randomizedthinking commented 8 years ago

The current implementation of the connect function demands the password to make a connection. Is it a better approach to read .pgpass and respect the peer authentication setting?

iamed2 commented 8 years ago

Hmm I didn't know about this.

Well the correct way to handle it would be to change the password argument to a Nullable and pass C_NULL when no password is provided. libpq will then read .pgpass for the password.

randomizedthinking commented 8 years ago

It seems like a better way. Is it easy to do? I am new to julia while it sounds like a good starting point.

iamed2 commented 8 years ago

Yup, just involves changing a few method signatures/calls. Give it a shot! :)