Datagrip - 与 Heroku 的 PostgreSQL 连接未显示表格

Datagrip - PostgreSQL connection to Heroku not showing tables

我使用 Jetbrains Datagrip 连接到我的 Heroku PostgreSQL 数据库。认证成功,我连接的时候不需要指定advantage properties,当我填host, db, username and password, Test connection was成功的。

当我向控制台写入查询时,一切正常,例如:

SELECT * FROM users

在我的数据库中查找所有用户。

我有问题,当我想在我的数据库结构中查看 时。他们没有出现。在项目树中,我只能看到 Database_name -> 模式 -> public -> key_id_seq(图像:Project tree structure)。当我点击同步按钮时,出现错误:

[42703] org.postgresql.util.PSQLException: ERROR: column t.relhasoids does not exist
  Position: .
Error encountered when performing Introspect database *db_name* schema public (details): ERROR: column t.relhasoids does not exist
  Position: .
ERROR: column t.relhasoids does not exist
  Position: 

我是不是做错了什么?谢谢你。

Datagrip 已更新至版本 DataGrip 2019.3.3,Build #DB-193.6494.42,构建于 2020 年 2 月 12 日,正在运行:)

尝试使用“使用 JDBC 元数据进行内省”。当(我认为)我在 postgresql 服务器和 DataGrip 客户端之间存在版本不匹配时,这为我修复了它。

在您的连接设置下 -> 选项选项卡 -> 使用 JDBC 元数据检查 Introspect

根据https://www.jetbrains.com/help/datagrip/data-sources-and-drivers-dialog.html#optionsTab

Switch to the JDBC-based introspector.

To retrieve information about database objects (DB metadata), DataGrip uses the following introspectors:

  1. A native introspector (might be unavailable for certain DBMS). The native introspector uses DBMS-specific tables and views as a source of metadata. It can retrieve DBMS-specific details and produce a more precise picture of database objects.

  2. A JDBC-based introspector (available for all the DBMS). The JDBC-based introspector uses the metadata provided by the JDBC driver. It can retrieve only standard information about database objects and their properties.

Consider using the JDBC-based intorspector when the native introspector fails or is not available.

The native introspector can fail, when your database server version is older than the minimum version supported by DataGrip.

You can try to switch to the JDBC-based introspector to fix problems with retrieving the database structure information from your database. For example, when the schemas that exist in your database or database objects below the schema level are not shown in the Database tool window.

我这里的情况不同。但我收到了类似的错误:

发生错误:

01:15:21 PM: Error: ERROR:  column rel.relhasoids does not exist
LINE 1: ...t_userbyid(rel.relowner) AS relowner, rel.relacl, rel.relhas...

我正在使用 pgadmin 3 连接到 Heroku 托管的 Postgresql。然后我配置 pgadmin 4。错误没有显示在上面。为了安装 pgadmin 4,我使用了 docker 方法。

docker pull dpage/pgadmin4
docker run -p 5050:80 -e "PGADMIN_DEFAULT_EMAIL=XXXX@Xmail.com" -e "PGADMIN_DEFAULT_PASSWORD=thirumal" -d dpage/pgadmin4

现在,打开浏览器并导航 http://localhost:5050/.