-
Notifications
You must be signed in to change notification settings - Fork 49
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
LibPQ and local peer trust ("ident") #253
Comments
Can you please post the error you see? And can you add some details about the environment (e.g. OS, PostgreSQL server version, the auth method specified in pg_hba.conf)? Does it work in Python's psycopg2? With |
Using using LibPQ
conn = LibPQ.Connection("dbname=rugby") I get
This is on Linux Ubuntu 22.04, PostgreSQL 14.5 and Julia 1.8.0. No environmental variables related to PostgreSQL are set. The authentication method in pg_hba.conf is peer.
Works as expected with "psql rugby" on the command line, Python with Psycopg 3, and Julia and ODBC using the following
I can get LibPQ.jl to work if I create a .pgpass and connect via using LibPQ
conn = LibPQ.Connection("dbname=rugby host=localhost") |
Great, thanks, that was enough information to replicate! Replication steps for my future reference:
The difference in behaviour comes from using a You can pass |
Thank you! This works perfectly. |
LibPQ doesnt' seem to allow connections via local peer trust ("ident").
i.e., this fails:
Here the database "rugby" is owned by me, and the PostgreSQL server uses "ident". The same connection, however, works with Julia's ODBC and Python's Psycopg 3.
The text was updated successfully, but these errors were encountered: