Open joaodlf opened 6 years ago
Managed to get around it with tweaking the pg_hba.conf, needed to set a few local connections to "trust". Oh well.
I'm going to leave this open, because it's a bug, even though there's a workaround. Thanks for the report!
Cool! I also noticed I can only get pgcli to work properly using the -h flag (ex: pgcli -U postgres -h localhost), without that specific flag, I get the same error, even with the pg_hba.conf tweaks.
@joaodlf could you attach your pg_hba.conf
? might be helpful to recreate the problem.
Sure!
# TYPE DATABASE USER ADDRESS METHOD
# "local" is for Unix domain socket connections only
local all all trust
# IPv4 local connections:
host all all 127.0.0.1/32 trust
# IPv6 local connections:
host all all ::1/128 trust
# Allow replication connections from localhost, by a user with the
# replication privilege.
local replication all trust
host replication all 127.0.0.1/32 trust
host replication all ::1/128 trust
# Allow external connections with a password
host all all 0.0.0.0/0 md5
host all all ::/0 md5
This is from the same machine as expressed in my initial report:
PostgreSQL 10.3 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-16), 64-bit
pgcli will only work as expected with the following command:
pgcli -U postgres -h localhost
For what it's worth, I'm running into the same problem and @joaodlf's workaround is working.
Description
I get the following error when I start pgcli:
I can execute psql commands fine, but all queries just return the above error, as well.
Your environment
Centos 7 Python 2.7.5 Installed pgcli via pip Postgres version 10.3
I've tried installing pgcli on an empty virtualenv, but get the same results.
pip freeze: