PostgreSQL.jl icon indicating copy to clipboard operation
PostgreSQL.jl copied to clipboard

Connection authentication

Open randomizedthinking opened this issue 9 years ago • 3 comments
trafficstars

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?

randomizedthinking avatar Jul 17 '16 02:07 randomizedthinking

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.

iamed2 avatar Jul 17 '16 02:07 iamed2

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

randomizedthinking avatar Jul 17 '16 23:07 randomizedthinking

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

iamed2 avatar Jul 18 '16 02:07 iamed2