正如标题所指出的,当我尝试使用 PostgreSQL 从命令行连接到 PostgreSql 数据库时出现此错误。
客户端机器是 Ubuntu 11.10 x86_64 并且 PostgreSQL 库来自版本 9.1
服务器是 PostgreSql 8.3。
这是我执行的命令:
psql -U postgres -d my_database -h 192.168.0.161 -p 5432 -c "select * from xxyy"
Run Code Online (Sandbox Code Playgroud)
当我使用sudoor时,我得到了相同的结果su postgres。
可悲的是,我可以毫无问题地使用pgAdmin.
任何提示?