PgAdmin4 无法查询或查看数据 [英] PgAdmin4 unable to query or view data

查看:83
本文介绍了PgAdmin4 无法查询或查看数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个非常基本的 PostgreSql 表.尽管表架构简单,但我无法通过 PgAdmin4 查询它.

I have a very basic PostgreSql table. Despite the simple table schema, I cannot query it via PgAdmin4.

View Data 选项没有响应;在尝试打开和关闭面板几次后,Query Tool 选项变得无响应.当查询工具最终(以某种方式)启动时,像

The View Data option is unresponsive; Query Tool option becomes unresponsive after a few attempts in opening and closing the panel. When the Query Tool is eventually (somehow) launched, a trivial SQL statement like

SELECT * FROM test_table

将永远旋转,永不显示.

will spin forever and never display.

上图显示了完全相同的表,在 PgAdmin3 下是可以的.

The diagram above shows the exact same table, which is okay under PgAdmin3.

该表被创建为空.然后加了一行.但是它抛出了关于没有主键的错误.当我尝试设置主键时,这也会引发错误.所以我使用 TeamPostgreSql 来设置主键.所以现在在 PgAdmin3 下一切都很好.因此,我真的很好奇 PgAdmin4 发生了什么?

The table was created empty. Then added with a row. But it threw errors about not having a Primary Key. Which also threw errors when I tried to set a Primary Key. So I used TeamPostgreSql to set a Primary Key. So all is good under PgAdmin3 now. Hence I'm really curious about what's going on with PgAdmin4?

推荐答案

我正在运行 pgAdmin4 v3.0 并且我已经将 localhost 作为主机名.

I'm running pgAdmin4 v3.0 and I've put localhost as host name.

我的意思是,左面板>服务器 >创建 >服务器然后连接选项卡>主机名

我无法查询表格,点击查看/编辑数据 > 所有行没有结果(也没有错误日志条目).

I could not query tables, clicking on view/edit data > all rows had no results (nor error log entries).

在我将服务器名称从 localhost 更改为 127.0.0.1 后,一切正常!

After I changed server name from localhost to 127.0.0.1, all worked as expected!

我希望它有所帮助,因为我在这个问题上浪费了太多时间并且找不到正确的答案.

I hope it helps, because I've lost so much time on this and could not find a proper answer.

这篇关于PgAdmin4 无法查询或查看数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆